feat: mainWindow check panel color on windows when deciding upon try icon color
This commit is contained in:
parent
17392a8e06
commit
8b513efc95
1 changed files with 10 additions and 0 deletions
|
|
@ -761,6 +761,16 @@ void MainWindow::setTrayIcon()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
QSettings settings(
|
||||||
|
QStringLiteral("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"),
|
||||||
|
QSettings::NativeFormat
|
||||||
|
);
|
||||||
|
const QString theme = settings.value(QStringLiteral("SystemUsesLightTheme"), 1).toBool() ? QStringLiteral("light")
|
||||||
|
: QStringLiteral("dark");
|
||||||
|
iconString = QStringLiteral(":/icons/deskflow-%1/apps/64/%2").arg(theme, kRevFqdnName);
|
||||||
|
#endif
|
||||||
|
|
||||||
iconString.append(QStringLiteral("-symbolic"));
|
iconString.append(QStringLiteral("-symbolic"));
|
||||||
auto icon = QIcon::fromTheme(iconString);
|
auto icon = QIcon::fromTheme(iconString);
|
||||||
icon.setIsMask(true);
|
icon.setIsMask(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue