diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-08 21:21:08 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-08 21:21:08 +0200 |
| commit | c21a68c807dcb84b4ce910ee0f73238a8019ffe9 (patch) | |
| tree | ae1e5e0fc7a846daf74623c6cd6270612ff0e56f /Map/Presentation/Preferences/MapPreferencesView.swift | |
| parent | 8f6da65a680cdd30ec541b3b226137004a1e4681 (diff) | |
Allow export/import of preferences
Diffstat (limited to 'Map/Presentation/Preferences/MapPreferencesView.swift')
| -rw-r--r-- | Map/Presentation/Preferences/MapPreferencesView.swift | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Map/Presentation/Preferences/MapPreferencesView.swift b/Map/Presentation/Preferences/MapPreferencesView.swift index f6c909c..71e9d6c 100644 --- a/Map/Presentation/Preferences/MapPreferencesView.swift +++ b/Map/Presentation/Preferences/MapPreferencesView.swift @@ -16,10 +16,14 @@ import SwiftUI struct MapPreferencesView: View { - @AppStorage("showMapBackground") private var showBackground = true - @AppStorage("useCustomFont") private var useCustomFont = false - @AppStorage("customFontName") private var customFontName = "Helvetica" - @AppStorage("defaultExportFormat") private var defaultExportFormat = "png" + @AppStorage("showMapBackground") private var showBackground = UserPreferences.Defaults + .showMapBackground + @AppStorage("useCustomFont") private var useCustomFont = UserPreferences.Defaults.useCustomFont + @AppStorage("customFontName") private var customFontName = UserPreferences.Defaults.customFontName + @AppStorage("defaultExportFormat") private var defaultExportFormat = UserPreferences.Defaults + .defaultExportFormat + @AppStorage("useSmartLabelPositioning") private var useSmartLabelPositioning = UserPreferences + .Defaults.useSmartLabelPositioning var body: some View { VStack(alignment: .center, spacing: Dimensions.Spacing.loose) { @@ -37,6 +41,13 @@ struct MapPreferencesView: View { }) Toggle( + isOn: $useSmartLabelPositioning, + label: { + Text("preferences.map.map_style.use_smart_label_positioning") + .font(.Theme.Body.regular) + }) + + Toggle( isOn: $useCustomFont, label: { Text("preferences.map.map_style.use_custom_font") |