resize tray icon because a 1024x1024 icon won't show in ubuntu (bug)
This commit is contained in:
parent
8e76ca0429
commit
ac23394ea8
@ -115,8 +115,8 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
|
|||||||
}
|
}
|
||||||
windowTitle += " " + networkStyle->getTitleAddText();
|
windowTitle += " " + networkStyle->getTitleAddText();
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
QApplication::setWindowIcon(networkStyle->getAppIcon());
|
QApplication::setWindowIcon(networkStyle->getTrayAndWindowIcon());
|
||||||
setWindowIcon(networkStyle->getAppIcon());
|
setWindowIcon(networkStyle->getTrayAndWindowIcon());
|
||||||
#else
|
#else
|
||||||
MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon());
|
MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon());
|
||||||
#endif
|
#endif
|
||||||
@ -491,7 +491,7 @@ void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
|
|||||||
trayIcon = new QSystemTrayIcon(this);
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
QString toolTip = tr("Bitcoin Core client") + " " + networkStyle->getTitleAddText();
|
QString toolTip = tr("Bitcoin Core client") + " " + networkStyle->getTitleAddText();
|
||||||
trayIcon->setToolTip(toolTip);
|
trayIcon->setToolTip(toolTip);
|
||||||
trayIcon->setIcon(networkStyle->getAppIcon());
|
trayIcon->setIcon(networkStyle->getTrayAndWindowIcon());
|
||||||
trayIcon->show();
|
trayIcon->show();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ NetworkStyle::NetworkStyle(const QString &appName, const int iconColorHueShift,
|
|||||||
}
|
}
|
||||||
|
|
||||||
appIcon = QIcon(pixmap);
|
appIcon = QIcon(pixmap);
|
||||||
|
trayAndWindowIcon = QIcon(pixmap.scaled(QSize(256,256)));
|
||||||
}
|
}
|
||||||
|
|
||||||
const NetworkStyle *NetworkStyle::instantiate(const QString &networkId)
|
const NetworkStyle *NetworkStyle::instantiate(const QString &networkId)
|
||||||
|
@ -18,6 +18,7 @@ public:
|
|||||||
|
|
||||||
const QString &getAppName() const { return appName; }
|
const QString &getAppName() const { return appName; }
|
||||||
const QIcon &getAppIcon() const { return appIcon; }
|
const QIcon &getAppIcon() const { return appIcon; }
|
||||||
|
const QIcon &getTrayAndWindowIcon() const { return trayAndWindowIcon; }
|
||||||
const QString &getTitleAddText() const { return titleAddText; }
|
const QString &getTitleAddText() const { return titleAddText; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -25,6 +26,7 @@ private:
|
|||||||
|
|
||||||
QString appName;
|
QString appName;
|
||||||
QIcon appIcon;
|
QIcon appIcon;
|
||||||
|
QIcon trayAndWindowIcon;
|
||||||
QString titleAddText;
|
QString titleAddText;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user