mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
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:
parent
d99f40623c
commit
1261e7da78
2 changed files with 9 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ protected:
|
|||
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush);
|
||||
|
||||
public:
|
||||
bool isBuiltInTheme();
|
||||
bool isDarkMode();
|
||||
QStringMap &getAvailableThemes();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue