fix(SystemTheme): use default palette on all system themes

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-04-06 06:40:43 -04:00
parent c1b460fa05
commit e5861129ad
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
4 changed files with 22 additions and 10 deletions

View file

@ -44,6 +44,8 @@ ThemeManager::ThemeManager()
m_defaultStyle = style->objectName();
themeDebugLog() << "System theme seems to be:" << m_defaultStyle;
m_defaultPalette = QApplication::palette();
initializeThemes();
initializeCatPacks();
}
@ -126,7 +128,7 @@ void ThemeManager::initializeIcons()
void ThemeManager::initializeWidgets()
{
themeDebugLog() << "<> Initializing Widget Themes";
themeDebugLog() << "Loading Built-in Theme:" << addTheme(std::make_unique<SystemTheme>(m_defaultStyle, true));
themeDebugLog() << "Loading Built-in Theme:" << addTheme(std::make_unique<SystemTheme>(m_defaultStyle, m_defaultPalette, true));
auto darkThemeId = addTheme(std::make_unique<DarkTheme>());
themeDebugLog() << "Loading Built-in Theme:" << darkThemeId;
themeDebugLog() << "Loading Built-in Theme:" << addTheme(std::make_unique<BrightTheme>());
@ -139,7 +141,7 @@ void ThemeManager::initializeWidgets()
continue;
}
#endif
themeDebugLog() << "Loading System Theme:" << addTheme(std::make_unique<SystemTheme>(st, false));
themeDebugLog() << "Loading System Theme:" << addTheme(std::make_unique<SystemTheme>(st, m_defaultPalette, false));
}
// TODO: need some way to differentiate same name themes in different subdirectories