From ee5f1ff07ebf275becb47d5a9159130b2190c485 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Fri, 11 Jul 2025 15:13:58 +0200 Subject: More control over theme --- .../Preferences/GeneralPreferencesView.swift | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Map/Presentation/Preferences/GeneralPreferencesView.swift') 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) -- cgit