mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 00:06:16 -07:00
- FEATURE: Added monochrome icon for light themes
- BUGFIX: Change systray icon on the fly (no restart needed)
This commit is contained in:
parent
dfa16320f0
commit
01b5844174
9 changed files with 88 additions and 36 deletions
|
@ -994,6 +994,10 @@ void MainWindow::loadPreferences(bool configure_session) {
|
|||
delete myTrayIconMenu;
|
||||
}
|
||||
}
|
||||
// Reload systray icon
|
||||
if(newSystrayIntegration && systrayIcon) {
|
||||
systrayIcon->setIcon(getSystrayIcon());
|
||||
}
|
||||
// General
|
||||
if(pref.isToolbarDisplayed()) {
|
||||
toolBar->setVisible(true);
|
||||
|
@ -1350,8 +1354,14 @@ void MainWindow::checkForActiveTorrents()
|
|||
QIcon MainWindow::getSystrayIcon() const
|
||||
{
|
||||
#if defined(Q_WS_X11)
|
||||
if(Preferences().useMonochromeTrayIcon()) {
|
||||
TrayIcon::Style style = Preferences().trayIconStyle();
|
||||
switch(style) {
|
||||
case TrayIcon::MONO_DARK:
|
||||
return QIcon(":/Icons/skin/qbittorrent_mono_dark.png");
|
||||
case TrayIcon::MONO_LIGHT:
|
||||
return QIcon(":/Icons/skin/qbittorrent_mono_light.png");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
QIcon icon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue