111 void setTheme(
const QString& themeId);
152 QFont
scaledFont(
const QFont& baseFont)
const;
198 static QColor
ensureContrast(
const QColor& fg,
const QColor& bg,
int minDiff = 120);
201 static QColor
lightenColor(
const QColor& color,
int amount);
204 static QColor
darkenColor(
const QColor& color,
int amount);
226 void registerBuiltinThemes();
229 void connectSystemThemeSignals();
232 void onSystemColorSchemeChanged();
235 QString resolveAutoThemeId()
const;
238 bool isAutoMode()
const;
241 Theme createAutoTheme();
242 Theme createSystemTheme();
243 Theme createStandardDarkTheme();
244 Theme createStandardLightTheme();
245 Theme createCachyOSEmeraldTheme();
246 Theme createNordDarkTheme();
247 Theme createNordLightTheme();
248 Theme createDraculaTheme();
249 Theme createCatppuccinMochaTheme();
250 Theme createCatppuccinLatteTheme();
251 Theme createGruvboxDarkTheme();
252 Theme createGruvboxLightTheme();
253 Theme createTokyoNightTheme();
254 Theme createSolarizedLightTheme();
257 bool isSystemDarkMode()
const;
260 void updateEffectiveColors();
263 void refreshAllWidgetStyles();
266 void generateIndicatorIcons();
269 std::map<QString, Theme> themes_;
270 QString currentThemeId_;
273 QColor customAccentColor_;
274 bool useCustomAccent_ =
false;
280 int zoomLevel_ = 100;
282 mutable int baseFontSize_ = 0;
285 QString checkmarkIconPath_;
286 QString radioDotIconPath_;
static ThemeManager & instance()
void applyToApplication()
Apply current theme to the entire application.
QPalette buildPalette() const
Build QPalette from current theme.
static QColor ensureContrast(const QColor &fg, const QColor &bg, int minDiff=120)
Ensure foreground has sufficient contrast against background.
void resetAccentToDefault()
Reset accent to theme default.
static QColor darkenColor(const QColor &color, int amount)
Darken a color by decreasing its lightness.
QString currentThemeId() const
Get current theme ID.
QString buildStyleSheet() const
Build global stylesheet for widgets not covered by QPalette.
QString fontFamily() const
Get current font family (empty = system default).
bool hasCustomAccent() const
Check if using custom accent color.
void loadFromSettings()
Load theme settings from settings controller.
void styleMenu(QMenu *menu) const
Apply complete menu styling (stylesheet + palette) to a QMenu.
void setAccentColor(const QColor &color)
Set custom accent color (overrides theme default).
int scaledSize(int baseSize) const
Get scaled dimension for layouts/spacing.
void initialize(core::SettingsController *settingsController)
void setFontFamily(const QString &family)
Set font family.
void themeChanged()
Emitted when theme or accent color changes.
static QColor lightenColor(const QColor &color, int amount)
Lighten a color by increasing its lightness.
const Theme * getTheme(const QString &id) const
Get theme by ID (returns nullptr if not found).
void setZoomLevel(int percent)
Set zoom level (75-150).
int scaledFontSize(int baseSize) const
Get scaled font size for given base size.
QString menuStyleSheet() const
Get standalone menu stylesheet (for dynamically created menus).
int zoomLevel() const
Get current zoom level (75-150, default 100).
void setTheme(const QString &themeId)
Set active theme by ID.
void zoomChanged()
Emitted when zoom level or font changes.
const Theme * currentTheme() const
Get current theme.
const ThemeColors & colors() const
Get effective colors (with accent customization applied).
ThemeManager(const ThemeManager &)=delete
QFont scaledFont(const QFont &baseFont) const
Get scaled font (applies zoom + custom family if set).
std::vector< QString > getAvailableThemeIds() const
Get list of available theme IDs.
void saveToSettings()
Save theme settings to settings controller.
QColor accentColor() const
Get current accent color (custom or theme default).
QFont applicationFont() const
Get the base application font (with zoom and custom family applied).
ThemeManager & operator=(const ThemeManager &)=delete
QColor scrollbarThumbHover