mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -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;
|
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()
|
QStringMap &ThemeManager::getAvailableThemes()
|
||||||
{
|
{
|
||||||
QDir dir;
|
QDir dir;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ protected:
|
||||||
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush);
|
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
bool isBuiltInTheme();
|
||||||
bool isDarkMode();
|
bool isDarkMode();
|
||||||
QStringMap &getAvailableThemes();
|
QStringMap &getAvailableThemes();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue