mirror of
https://github.com/yattee/yattee.git
synced 2026-07-19 22:02:10 +00:00
Add custom accent color with system color picker
Add a Custom swatch to the appearance settings accent color grid, backed by a hex value stored in settings (synced via iCloud like the rest). iOS uses the native ColorPicker wheel; macOS uses a circular swatch that opens NSColorPanel, since the SwiftUI color well looks out of place among the circles. All accent consumers now read the resolved color through SettingsManager.resolvedAccentColor. The indigo preset is retired from the grid but kept in the enum, so users who selected it keep their color until they pick another one. Claude-Session: https://claude.ai/code/session_0154KH8RAVAvm6iVanhmoW8o
This commit is contained in:
@@ -65,6 +65,20 @@ struct AccentColorTests {
|
||||
#expect(color == decoded)
|
||||
}
|
||||
}
|
||||
|
||||
@Test("Presets exclude custom and retired indigo")
|
||||
func presetsExcludeHiddenCases() {
|
||||
#expect(!AccentColor.presets.contains(.custom))
|
||||
#expect(!AccentColor.presets.contains(.indigo))
|
||||
#expect(AccentColor.presets.count == AccentColor.allCases.count - 2)
|
||||
}
|
||||
|
||||
@Test("Retired indigo still decodes and resolves")
|
||||
func retiredIndigoStillWorks() throws {
|
||||
let decoded = try JSONDecoder().decode(AccentColor.self, from: Data("\"indigo\"".utf8))
|
||||
#expect(decoded == .indigo)
|
||||
#expect(AccentColor(rawValue: "indigo") == .indigo)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - VideoQuality Tests
|
||||
|
||||
Reference in New Issue
Block a user