[trojita] src/Gui: GUI: Profile-specific icon for systray

Jan Kundrát jkt at kde.org
Mon Oct 24 13:11:17 UTC 2016


Git commit 7745c20152919798ff935ca24b1ca3b092230b41 by Jan Kundrát.
Committed on 18/10/2016 at 19:46.
Pushed by gerrit into branch 'master'.

GUI: Profile-specific icon for systray

It's nice to distinguish among the different instances in the systray,
too. On the other hand, this code sucks a bit because it doesn't really
work on dark icons. Patches which improve this are welcome :).

Change-Id: I2b7735841a35ab93c4e4208acbfa60228cff5651

M  +1    -1    src/Gui/Window.cpp

http://commits.kde.org/trojita/7745c20152919798ff935ca24b1ca3b092230b41

diff --git a/src/Gui/Window.cpp b/src/Gui/Window.cpp
index 08365a1..2cfae70 100644
--- a/src/Gui/Window.cpp
+++ b/src/Gui/Window.cpp
@@ -952,7 +952,7 @@ void MainWindow::handleTrayIconChange()
 
     const bool isOffline = qobject_cast<Imap::Mailbox::NetworkWatcher *>(m_imapAccess->networkWatcher())->effectiveNetworkPolicy()
             == Imap::Mailbox::NETWORK_OFFLINE;
-    auto pixmap = UiUtils::loadIcon(QStringLiteral("trojita"))
+    auto pixmap = qApp->windowIcon()
                 .pixmap(QSize(32, 32), isOffline ? QIcon::Disabled : QIcon::Normal);
     QString tooltip;
     auto profileName = QString::fromUtf8(qgetenv("TROJITA_PROFILE"));


More information about the kde-doc-english mailing list