1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-29 16:49:27 +01:00

Fix default setting for system tray

This commit is contained in:
Jonas Kvinge 2018-10-01 00:29:06 +02:00
parent 827898cd38
commit 560bc0a150

View File

@ -778,7 +778,7 @@ void MainWindow::ReloadSettings() {
#ifndef Q_OS_MACOS
settings.beginGroup(BehaviourSettingsPage::kSettingsGroup);
bool showtrayicon = settings.value("showtrayicon", true).toBool();
bool showtrayicon = settings.value("showtrayicon", (QSystemTrayIcon::isSystemTrayAvailable() ? true : false)).toBool();
settings.endGroup();
if (tray_icon_) tray_icon_->SetVisible(showtrayicon);
if ((!showtrayicon || !QSystemTrayIcon::isSystemTrayAvailable()) && !isVisible()) show();