diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2014-11-14 17:16:31 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-16 11:15:08 +0100 |
commit | ac23394ea8118fe50131513bcd68c822a7ac4095 (patch) | |
tree | 5296d36bb6221baf8ec222e102afdd9d8dcbbe60 | |
parent | 8e76ca0429db552cbf6f51dadd5467a1bc899027 (diff) |
resize tray icon because a 1024x1024 icon won't show in ubuntu (bug)
-rw-r--r-- | src/qt/bitcoingui.cpp | 6 | ||||
-rw-r--r-- | src/qt/networkstyle.cpp | 3 | ||||
-rw-r--r-- | src/qt/networkstyle.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index f63ebac6ea..3f5d0a191b 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -115,8 +115,8 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) : } windowTitle += " " + networkStyle->getTitleAddText(); #ifndef Q_OS_MAC - QApplication::setWindowIcon(networkStyle->getAppIcon()); - setWindowIcon(networkStyle->getAppIcon()); + QApplication::setWindowIcon(networkStyle->getTrayAndWindowIcon()); + setWindowIcon(networkStyle->getTrayAndWindowIcon()); #else MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon()); #endif @@ -491,7 +491,7 @@ void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle) trayIcon = new QSystemTrayIcon(this); QString toolTip = tr("Bitcoin Core client") + " " + networkStyle->getTitleAddText(); trayIcon->setToolTip(toolTip); - trayIcon->setIcon(networkStyle->getAppIcon()); + trayIcon->setIcon(networkStyle->getTrayAndWindowIcon()); trayIcon->show(); #endif diff --git a/src/qt/networkstyle.cpp b/src/qt/networkstyle.cpp index 3762b84842..ff05174fb4 100644 --- a/src/qt/networkstyle.cpp +++ b/src/qt/networkstyle.cpp @@ -71,7 +71,8 @@ NetworkStyle::NetworkStyle(const QString &appName, const int iconColorHueShift, pixmap.convertFromImage(img); } - appIcon = QIcon(pixmap); + appIcon = QIcon(pixmap); + trayAndWindowIcon = QIcon(pixmap.scaled(QSize(256,256))); } const NetworkStyle *NetworkStyle::instantiate(const QString &networkId) diff --git a/src/qt/networkstyle.h b/src/qt/networkstyle.h index 3e3332cd8b..953004c127 100644 --- a/src/qt/networkstyle.h +++ b/src/qt/networkstyle.h @@ -18,6 +18,7 @@ public: const QString &getAppName() const { return appName; } const QIcon &getAppIcon() const { return appIcon; } + const QIcon &getTrayAndWindowIcon() const { return trayAndWindowIcon; } const QString &getTitleAddText() const { return titleAddText; } private: @@ -25,6 +26,7 @@ private: QString appName; QIcon appIcon; + QIcon trayAndWindowIcon; QString titleAddText; }; |