Add a utility method to check if we're using a built-in theme

Took 3 minutes

Took 3 seconds
This commit is contained in:
Lukas Brübach 2026-04-08 15:19:09 +02:00
parent d99f40623c
commit 1261e7da78
2 changed files with 9 additions and 0 deletions

View file

@ -133,6 +133,14 @@ bool ThemeManager::isDarkMode()
return false;
}
bool ThemeManager::isBuiltInTheme()
{
const auto themeName = SettingsCache::instance().getThemeName();
return themeName == NONE_THEME_NAME || themeName == FUSION_THEME_NAME || themeName == FUSION_THEME_NAME_LIGHT ||
themeName == FUSION_THEME_NAME_DARK;
}
QStringMap &ThemeManager::getAvailableThemes()
{
QDir dir;

View file

@ -54,6 +54,7 @@ protected:
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush);
public:
bool isBuiltInTheme();
bool isDarkMode();
QStringMap &getAvailableThemes();