feat: mainWindow check panel color on windows when deciding upon try icon color

This commit is contained in:
sithlord48
2025-10-25 10:56:59 -04:00
committed by Chris Rizzitello
parent 17392a8e06
commit 8b513efc95

View File

@ -761,6 +761,16 @@ void MainWindow::setTrayIcon()
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"));
auto icon = QIcon::fromTheme(iconString);
icon.setIsMask(true);