From e59dcf2bcf7841ebe6f3d85ec3ec03319b261da4 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 7 Jul 2025 16:52:28 +0200 Subject: More localization keys, font editor preferences, better new file --- .../Preferences/MapPreferencesView.swift | 23 +++++----------------- 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'Map/Presentation/Preferences/MapPreferencesView.swift') diff --git a/Map/Presentation/Preferences/MapPreferencesView.swift b/Map/Presentation/Preferences/MapPreferencesView.swift index 264be14..d81916f 100644 --- a/Map/Presentation/Preferences/MapPreferencesView.swift +++ b/Map/Presentation/Preferences/MapPreferencesView.swift @@ -17,7 +17,6 @@ import SwiftUI struct MapPreferencesView: View { @AppStorage("showMapBackground") private var showBackground = true - @AppStorage("useSmartEditor") private var useSmartEditor = false @AppStorage("useCustomFont") private var useCustomFont = false @AppStorage("customFontName") private var customFontName = "Helvetica" @@ -26,7 +25,7 @@ struct MapPreferencesView: View { HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { Text("preferences.map.map_style.title") .font(.Theme.Body.emphasized) - .frame(maxWidth: .infinity, alignment: .trailing) + .frame(maxWidth: 250, alignment: .trailing) VStack(alignment: .leading, spacing: Dimensions.Spacing.cozy) { Toggle( @@ -49,28 +48,16 @@ struct MapPreferencesView: View { } } .pickerStyle(MenuPickerStyle()) + .frame(maxWidth: 250) + .padding(.leading, -Dimensions.Spacing.regular) .disabled(!useCustomFont) } .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() - } - .padding() + }.padding(.vertical, Dimensions.Spacing.loose) + .padding(.horizontal, Dimensions.Spacing.indulgent) } } -- cgit