14#include <QLoggingCategory>
21#include <qtmetamacros.h>
51 std::array<QBrush, Role::MaxRole + 1>
brushes;
61 QBrush
loadBrush(QString fileName, QColor fallbackColor);
66 const QString &activeScheme);
89 bool isDarkMode(
const QString &themeDirPath)
const;
115 QString
assetPath(QStringView prefix)
const;
Definition theme_manager.h:29
static QString writableThemeDir(const QString &themeName)
Definition theme_manager.cpp:307
QBrush loadBrush(QString fileName, QColor fallbackColor)
Definition theme_manager.cpp:363
QBrush & getBgBrush(Role zone)
Definition theme_manager.cpp:698
void setStyleName(const QString &styleName)
Definition theme_manager.cpp:467
QColor appColor(AppColor::Role role) const
Definition theme_manager.cpp:564
QMap< AppColor::Role, QColor > currentAppColors
Definition theme_manager.h:53
QString defaultStyleName
Definition theme_manager.h:45
Role
Definition theme_manager.h:35
@ Table
Definition theme_manager.h:39
@ Hand
Definition theme_manager.h:37
@ MinRole
Definition theme_manager.h:36
@ Player
Definition theme_manager.h:40
@ MaxRole
Definition theme_manager.h:41
@ Stack
Definition theme_manager.h:38
QString assetPath(QStringView prefix) const
Definition theme_manager.cpp:265
std::array< QBrushMap, Role::MaxRole+1 > brushesCache
Definition theme_manager.h:57
bool isDarkMode(const QString &themeDirPath) const
Definition theme_manager.cpp:233
static PaletteConfig loadDefaultPaletteConfig(const QString &themeDirPath, const QString &themeName, const QString &colorScheme)
Definition theme_manager.cpp:429
std::array< QBrush, Role::MaxRole+1 > brushes
Definition theme_manager.h:51
QString currentThemePath
Definition theme_manager.h:50
void setColorScheme(const QString &scheme)
Definition theme_manager.cpp:456
static ThemeConfig loadGlobalConfig(const QString &themeDirPath)
Definition theme_manager.cpp:391
static bool saveGlobalConfig(const QString &themeDirPath, const ThemeConfig &cfg)
Definition theme_manager.cpp:396
bool isDarkModeActive() const
Definition theme_manager.h:91
void themeChangedSlot()
Definition theme_manager.cpp:591
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush)
Definition theme_manager.cpp:377
QPalette defaultPalette
Definition theme_manager.h:49
void applyStyleAndPalette(const QString &themeName, const ThemeConfig &themeCfg, const PaletteConfig &palCfg, const QString &activeScheme)
Definition theme_manager.cpp:491
static bool isDirReallyWritable(const QString &dirPath)
Definition theme_manager.cpp:295
void reloadCurrentTheme()
Definition theme_manager.cpp:478
QStringMap & getAvailableThemes()
Definition theme_manager.cpp:334
static bool commitPalette(const QString &themeDirPath, const QString &colorScheme, const PaletteConfig &cfg)
Writes cfg to disk as the theme's palette-<scheme>.toml and updates the theme's stored colour scheme ...
Definition theme_manager.cpp:443
QString getCurrentThemePath() const
Definition theme_manager.h:97
static PaletteConfig loadPaletteConfig(const QString &themeDirPath, const QString &colorScheme)
Definition theme_manager.cpp:401
QBrush getExtraBgBrush(Role zone, int zoneId=0)
Definition theme_manager.cpp:703
static bool savePaletteConfig(const QString &themeDirPath, const QString &colorScheme, const PaletteConfig &cfg)
Definition theme_manager.cpp:409
void previewPalette(const PaletteConfig &cfg, const QString &scheme)
Definition theme_manager.cpp:483
static void migrateLegacyThemeDir(const QString &themesPath, const QString ¤tThemeName)
Definition theme_manager.cpp:171
void ensureThemeDirectoryExists()
Definition theme_manager.cpp:214
QString schemeVariantPath(QStringView prefix) const
Definition theme_manager.cpp:250
ThemeManager(QObject *parent=nullptr)
Definition theme_manager.cpp:127
QStringMap availableThemes
Definition theme_manager.h:52
Q_LOGGING_CATEGORY(CrashReportLog, "crash_report")
Role
Definition theme_config.h:19
QMap< QString, QString > QStringMap
Definition sound_engine.h:21
Definition theme_config.h:39
Definition theme_config.h:27
QMap< int, QBrush > QBrushMap
Definition theme_manager.h:26
ThemeManager * themeManager
Definition main.cpp:84
QMap< QString, QString > QStringMap
Definition theme_manager.h:25