From a079bf406c4928a7a59e286cbde1f8bc2db12b67 Mon Sep 17 00:00:00 2001 From: Guido Date: Sat, 24 Oct 2026 17:45:54 +0200 Subject: [PATCH] feat: Die iOS-App traegt die Markenfarbe statt des System-Blaus Co-Authored-By: Claude Opus 5 --- ios/App/CertainApp.swift | 3 +++ ios/Bausteine/Darstellung.swift | 11 +++++++++++ ios/Budget/BudgetAnsicht.swift | 2 +- ios/Nebenraeume/KategorienAnsicht.swift | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ios/App/CertainApp.swift b/ios/App/CertainApp.swift index d31c2e6..de38b34 100644 --- a/ios/App/CertainApp.swift +++ b/ios/App/CertainApp.swift @@ -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) } } } diff --git a/ios/Bausteine/Darstellung.swift b/ios/Bausteine/Darstellung.swift index d1a17f3..b0f7ec2 100644 --- a/ios/Bausteine/Darstellung.swift +++ b/ios/Bausteine/Darstellung.swift @@ -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 diff --git a/ios/Budget/BudgetAnsicht.swift b/ios/Budget/BudgetAnsicht.swift index be8c63a..9a546c6 100644 --- a/ios/Budget/BudgetAnsicht.swift +++ b/ios/Budget/BudgetAnsicht.swift @@ -79,7 +79,7 @@ struct BudgetAnsicht: View { } label: { Label(String(localized: "budget.vorlage"), systemImage: "doc.text") } - .tint(.indigo) + .tint(.marke) } } } header: { diff --git a/ios/Nebenraeume/KategorienAnsicht.swift b/ios/Nebenraeume/KategorienAnsicht.swift index a68bb69..ef8c7e1 100644 --- a/ios/Nebenraeume/KategorienAnsicht.swift +++ b/ios/Nebenraeume/KategorienAnsicht.swift @@ -33,7 +33,7 @@ struct KategorienAnsicht: View { Label(String(localized: "allgemein.bearbeiten"), systemImage: "pencil") } - .tint(.indigo) + .tint(.marke) } } Button {