feat: Die iOS-App traegt die Markenfarbe statt des System-Blaus

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Guido
2026-10-24 17:45:54 +02:00
co-authored by Claude Opus 5
parent 929a735699
commit a079bf406c
4 changed files with 16 additions and 2 deletions
+3
View File
@@ -19,6 +19,9 @@ struct CertainApp: App {
.environment(zustand)
.task { await zustand.starte() }
.preferredColorScheme(schema)
// Einmal hier, damit jeder Knopf, Schalter und Link
// die Markenfarbe traegt statt des System-Blaus.
.tint(.marke)
}
}
}
+11
View File
@@ -23,6 +23,17 @@ extension Color {
}
}
extension Color {
/// Die Markenfarbe: dasselbe Grün wie `--accent` in `web/src/styles.css`,
/// damit App, Weboberfläche und Appicon eine Familie sind. In Dunkel eine
/// Spur heller, sonst säuft das Grün auf dunklem Grund ab.
static let marke = Color(uiColor: UIColor { zug in
zug.userInterfaceStyle == .dark
? UIColor(red: 0.373, green: 0.741, blue: 0.569, alpha: 1) // #5fbd91
: UIColor(red: 0.247, green: 0.612, blue: 0.447, alpha: 1) // #3f9c72
})
}
/// Übersetzt die Symbolnamen aus der Datenbank in SF Symbols.
///
/// Die Weboberfläche benutzt Lucide-Namen und hält dafür ein eigenes
+1 -1
View File
@@ -79,7 +79,7 @@ struct BudgetAnsicht: View {
} label: {
Label(String(localized: "budget.vorlage"), systemImage: "doc.text")
}
.tint(.indigo)
.tint(.marke)
}
}
} header: {
+1 -1
View File
@@ -33,7 +33,7 @@ struct KategorienAnsicht: View {
Label(String(localized: "allgemein.bearbeiten"),
systemImage: "pencil")
}
.tint(.indigo)
.tint(.marke)
}
}
Button {