diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-11 15:13:58 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-11 15:13:58 +0200 |
| commit | ee5f1ff07ebf275becb47d5a9159130b2190c485 (patch) | |
| tree | df5996ecc1e446e8aa6185e04b2995238b58a2af /Map/Presentation/Preferences | |
| parent | 49766f0c78015831f8be57349317f0d1c8228327 (diff) | |
More control over theme
Diffstat (limited to 'Map/Presentation/Preferences')
| -rw-r--r-- | Map/Presentation/Preferences/GeneralPreferencesView.swift | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Map/Presentation/Preferences/GeneralPreferencesView.swift b/Map/Presentation/Preferences/GeneralPreferencesView.swift index b5b781d..31e54c2 100644 --- a/Map/Presentation/Preferences/GeneralPreferencesView.swift +++ b/Map/Presentation/Preferences/GeneralPreferencesView.swift @@ -25,11 +25,32 @@ struct GeneralPreferencesView: View { @State private var showingExportFailedAlert = false @State private var exportShouldReset = false + @AppStorage("appearanceStyle") private var appearanceStyle: String = UserPreferences.Defaults + .appearanceStyle @AppStorage("quickLookPreviewStyle", store: UserDefaults(suiteName: "group.systems.tranquil.Map")) private var quickLookPreviewStyle: String = UserPreferences.Defaults.quickLookPreviewStyle var body: some View { VStack(alignment: .center, spacing: Dimensions.Spacing.loose) { + // Appearance section + HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { + Text("preferences.appearance.title") + .font(.Theme.Body.emphasized) + .frame(maxWidth: 250, alignment: .trailing) + + Picker("", selection: $appearanceStyle) { + ForEach(AppearanceStyle.allCases, id: \.rawValue) { style in + Text(style.localizedName) + .tag(style.rawValue) + } + } + .pickerStyle(.radioGroup) + .frame(maxWidth: 250, alignment: .leading) + .frame(maxWidth: .infinity, alignment: .leading) + } + + Divider() + // QuickLook section HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { Text("preferences.quick_look.title") @@ -95,7 +116,7 @@ struct GeneralPreferencesView: View { label: { Text("preferences.general.preferences.reset") .font(.Theme.Body.regular) - .foregroundColor(Color.Theme.jasperRed) + .foregroundColor(Color.Theme.UI.secondary) } ) .buttonStyle(.borderless) |