Allow to configure style and color scheme on all platforms

PR #23522.
This commit is contained in:
Vladimir Golovnev
2025-11-24 09:04:28 +03:00
committed by GitHub
parent 4a3922d152
commit a77b17e6da
5 changed files with 18 additions and 26 deletions

View File

@@ -76,13 +76,11 @@ UIThemeManager::UIThemeManager()
, m_useSystemIcons {Preferences::instance()->useSystemIcons()}
#endif
{
#ifdef Q_OS_WIN
if (const QString styleName = Preferences::instance()->getStyle(); styleName.compare(u"system", Qt::CaseInsensitive) != 0)
{
if (!QApplication::setStyle(styleName.isEmpty() ? u"Fusion"_s : styleName))
if (!QApplication::setStyle(styleName))
LogMsg(tr("Set app style failed. Unknown style: \"%1\"").arg(styleName), Log::WARNING);
}
#endif
#ifdef QBT_HAS_COLORSCHEME_OPTION
applyColorScheme();