mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Add separate light/dark mode accent colors
Adds an option in Appearance settings to use different accent colors in light and dark mode, with a toggle to keep a single shared color (the default, preserving existing behavior). - New synced settings keys: accentColorDark, customAccentColorDark, useSeparateDarkAccentColor; dark values fall back to the light selection until explicitly set, so no migration is needed - resolvedAccentColor returns a dynamic platform color (UIColor trait provider / NSColor appearance provider) when the toggle is on, so the root tint and all direct readers adapt to light/dark automatically without consumer changes - Accent Color section shows two stacked preset+custom grids with Light/Dark headers when enabled, extracted into AccentColorGrid; CustomAccentColorButton now takes bindings so the macOS color panel edits whichever target was last opened - New DarkAccentColorTests covering sync contract, default-off state, fallbacks, and toggle-off resolution Claude-Session: https://claude.ai/code/session_0154KH8RAVAvm6iVanhmoW8o
This commit is contained in:
@@ -29,6 +29,9 @@ final class SettingsManager {
|
||||
var _theme: AppTheme?
|
||||
var _accentColor: AccentColor?
|
||||
var _customAccentColor: String?
|
||||
var _accentColorDark: AccentColor?
|
||||
var _customAccentColorDark: String?
|
||||
var _useSeparateDarkAccentColor: Bool?
|
||||
var _showWatchedCheckmark: Bool?
|
||||
|
||||
// Playback
|
||||
@@ -419,6 +422,9 @@ final class SettingsManager {
|
||||
_theme = nil
|
||||
_accentColor = nil
|
||||
_customAccentColor = nil
|
||||
_accentColorDark = nil
|
||||
_customAccentColorDark = nil
|
||||
_useSeparateDarkAccentColor = nil
|
||||
_showWatchedCheckmark = nil
|
||||
_preferredQuality = nil
|
||||
_cellularQuality = nil
|
||||
|
||||
Reference in New Issue
Block a user