feat: selectable branded GoSentry color theme

Add a custom Fyne theme derived from the logo and app icon (deep teal
primary, amber accent, branded job-status colors) with light and dark
variants, and let the user choose between it and Fyne's default theme
from Settings. The dark variant uses deep-teal surfaces to echo the app
icon.

The choice is persisted as a new Config.Theme field ("default" /
"gosentry"), applied at startup before the first frame and live-previewed
when picked in Settings. Empty/legacy configs normalize to the default
theme so existing installs keep the original look.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-07-26 10:12:28 +03:00
parent eedae3b9f0
commit 84212764e4
8 changed files with 257 additions and 1 deletions
+4
View File
@@ -78,6 +78,7 @@ func loadOrCreateConfig(paths Paths) (domain.Config, error) {
NotifyOnFailure: true,
ExecutionMode: domain.ExecutionModeParallel,
OverlapPolicy: domain.OverlapPolicySkip,
Theme: domain.ThemeDefault,
DefaultTimeoutSeconds: 30,
}
@@ -117,6 +118,9 @@ func loadOrCreateConfig(paths Paths) (domain.Config, error) {
if config.DefaultTimeoutSeconds <= 0 {
config.DefaultTimeoutSeconds = 30
}
if config.Theme == "" {
config.Theme = domain.ThemeDefault
}
return config, nil
}
+3
View File
@@ -171,6 +171,9 @@ func TestLoadOrCreateConfigCreatesDefaultsOnFirstRun(t *testing.T) {
if got.DefaultTimeoutSeconds != 30 {
t.Errorf("default DefaultTimeoutSeconds = %d, want 30", got.DefaultTimeoutSeconds)
}
if got.Theme != domain.ThemeDefault {
t.Errorf("default Theme = %q, want %q", got.Theme, domain.ThemeDefault)
}
// The function must have written the defaults to gosentry.json.
if _, err := os.Stat(paths.ConfigPath); err != nil {
t.Errorf("gosentry.json should have been created: %v", err)