From 3fdaeab6a7fa19b0c5424de487efc37c0994c86e Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 7 Jul 2025 13:09:13 +0200 Subject: More localization and map preferences --- .../Preferences/MapPreferencesView.swift | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'Map/Presentation/Preferences/MapPreferencesView.swift') diff --git a/Map/Presentation/Preferences/MapPreferencesView.swift b/Map/Presentation/Preferences/MapPreferencesView.swift index fb5f8c2..f8c976e 100644 --- a/Map/Presentation/Preferences/MapPreferencesView.swift +++ b/Map/Presentation/Preferences/MapPreferencesView.swift @@ -16,14 +16,36 @@ import SwiftUI struct MapPreferencesView: View { + @AppStorage("showMapBackground") private var showBackground = true + @AppStorage("useSmartEditor") private var useSmartEditor = false + var body: some View { - VStack { - Text("Map Preferences") - .font(.largeTitle) - .padding() - - Text("Map settings will be available here in a future version.") - .foregroundColor(.secondary) + VStack(alignment: .center, spacing: Dimensions.Spacing.loose) { + HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { + Text("preferences.map.map_style.title") + .font(.Theme.Body.emphasized) + .frame(maxWidth: .infinity, alignment: .trailing) + + VStack(alignment: .leading, spacing: Dimensions.Spacing.cozy) { + Toggle(isOn: $showBackground, label: { Text("preferences.map.map_style.show_background") + .font(.Theme.Body.regular) + }) + } + .frame(maxWidth: .infinity, alignment: .leading) + } + + Divider() + + HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { + Text("preferences.map.editor.title") + .font(.Theme.Body.emphasized) + .frame(maxWidth: .infinity, alignment: .trailing) + + VStack(alignment: .leading, spacing: Dimensions.Spacing.cozy) { + Toggle(String(localized: "preferences.map.editor.use_smart_editor"), isOn: $useSmartEditor) + } + .frame(maxWidth: .infinity, alignment: .leading) + } Spacer() } -- cgit