File linphoneqt-0001-system-tray.patch of Package linphoneqt

diff -U 3 -H -b -B -d -r -N -- a/linphone-app/assets/images/systemtray.svg b/linphone-app/assets/images/systemtray.svg
--- a/linphone-app/assets/images/systemtray.svg	
+++ b/linphone-app/assets/images/systemtray.svg	
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
+  <path fill="#bebebe" d="M10.5 1.7c-.6 0-1 .4-1 1v3c0 .5.4.9 1 .9h.6c-.6 2.2-2.4 4-4.5 4.5v-.6c0-.5-.4-1-1-1H2.7a1 1 0 0 0-1 1V12a2.3 2.3 0 0 0 2.4 2.4h.6c5.3 0 9.5-4.3 9.5-9.6v-.6A2.3 2.3 0 0 0 12 1.7Zm0 0"/>
+</svg>
diff -U 3 -H -b -B -d -r -N -- a/linphone-app/cmake_builder/linphone_package/CMakeLists.txt b/linphone-app/cmake_builder/linphone_package/CMakeLists.txt
--- a/linphone-app/cmake_builder/linphone_package/CMakeLists.txt	
+++ b/linphone-app/cmake_builder/linphone_package/CMakeLists.txt	
@@ -305,6 +305,7 @@
 	configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../assets/qt.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/../../qt.conf" @ONLY)
 	install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../../qt.conf" DESTINATION "${CMAKE_INSTALL_BINDIR}")
 	install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/images/linphone_logo.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps/" RENAME "${EXECUTABLE_NAME}.svg")
+	install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/images/systemtray.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/web/" RENAME "${EXECUTABLE_NAME}systemtray.svg")
 	install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/linphonerc-factory" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}")
 	
 	install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/assistant" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}" USE_SOURCE_PERMISSIONS)
diff -U 3 -H -b -B -d -r -N -- a/linphone-app/resources.qrc b/linphone-app/resources.qrc
--- a/linphone-app/resources.qrc	
+++ b/linphone-app/resources.qrc	
@@ -560,6 +560,7 @@
 		<file>ui/views/App/Styles/Settings/SettingsUiStyle.qml</file>
 		<file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file>
 		<file>assets/images/linphone_logo.svg</file>
+		<file>assets/images/systemtray.svg</file>
 		<file>ui/dev-modules/Units/Units.qml</file>
 		<file>assets/icon.ico</file>
 	</qresource>
diff -U 3 -H -b -B -d -r -N -- a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp
--- a/linphone-app/src/app/App.cpp	
+++ b/linphone-app/src/app/App.cpp	
@@ -899,7 +899,10 @@
 	menu->addAction(quitAction);
 	if(!mSystemTrayIcon)
 		systemTrayIcon->setContextMenu(menu);// This is a Qt bug. We cannot call setContextMenu more than once. So we have to keep an instance of the menu.
-	systemTrayIcon->setIcon(QIcon(Constants::WindowIconPath));
+	/*
+	 * Use easier to see icon
+	 */
+	systemTrayIcon->setIcon(QIcon(Constants::SystemTrayIconPath));
 	systemTrayIcon->setToolTip(APPLICATION_NAME);
 	systemTrayIcon->show();
 	if(!mSystemTrayIcon)
diff -U 3 -H -b -B -d -r -N -- a/linphone-app/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp b/linphone-app/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp
--- a/linphone-app/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp	
+++ b/linphone-app/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp	
@@ -44,7 +44,7 @@
 }
 
 EventCountNotifier::EventCountNotifier (QObject *parent) : AbstractEventCountNotifier(parent) {
-  QSvgRenderer renderer((QString(Constants::WindowIconPath)));
+  QSvgRenderer renderer((QString(Constants::SystemTrayIconPath)));
   if (!renderer.isValid())
     qFatal("Invalid SVG Image.");
 
@@ -91,7 +91,7 @@
 
   // Draw background.
   {
-    p.setBrush(App::getInstance()->getColorListModel()->addImageColor("Logo_tray_blink_bg", Constants::WindowIconPath,"b")->getColor());
+    p.setBrush(App::getInstance()->getColorListModel()->addImageColor("Logo_tray_blink_bg", Constants::SystemTrayIconPath,"b")->getColor());
     p.drawEllipse(QPointF(width / 2, height / 2), IconCounterBackgroundRadius, IconCounterBackgroundRadius);
   }
 
@@ -101,7 +101,7 @@
     font.setPixelSize(IconCounterTextPixelSize);
 
     p.setFont(font);
-    p.setPen(QPen(App::getInstance()->getColorListModel()->addImageColor("Logo_tray_blink_fg", Constants::WindowIconPath,"ai")->getColor(), 1));
+    p.setPen(QPen(App::getInstance()->getColorListModel()->addImageColor("Logo_tray_blink_fg", Constants::SystemTrayIconPath,"ai")->getColor(), 1));
     p.drawText(QRect(0, 0, width, height), Qt::AlignCenter, QString::number(n));
   }
 
diff -U 3 -H -b -B -d -r -N -- a/linphone-app/src/utils/Constants.cpp b/linphone-app/src/utils/Constants.cpp
--- a/linphone-app/src/utils/Constants.cpp	
+++ b/linphone-app/src/utils/Constants.cpp	
@@ -1,6 +1,7 @@
 #include "Constants.hpp"
 
 constexpr char Constants::WindowIconPath[];
+constexpr char Constants::SystemTrayIconPath[];
 constexpr char Constants::DefaultLocale[];
 
 constexpr char Constants::LanguagePath[];
diff -U 3 -H -b -B -d -r -N -- a/linphone-app/src/utils/Constants.hpp b/linphone-app/src/utils/Constants.hpp
--- a/linphone-app/src/utils/Constants.hpp	
+++ b/linphone-app/src/utils/Constants.hpp	
@@ -108,6 +108,7 @@
 
 	static constexpr char LinphoneDomain[] = "sip.linphone.org";	// Use for checking if config are a Linphone
 	static constexpr char WindowIconPath[] = ":/assets/images/linphone_logo.svg";
+	static constexpr char SystemTrayIconPath[] = ":/assets/images/systemtray.svg";
 	static constexpr char ApplicationMinimalQtVersion[] = "5.10.0";
 	static constexpr char DefaultConferenceURI[] = "sip:conference-factory@sip.linphone.org";	// Default for a Linphone account
 	static constexpr char DefaultVideoConferenceURI[] = "sip:videoconference-factory@sip.linphone.org";	// Default for a Linphone account
openSUSE Build Service is sponsored by