aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Preferences/MapPreferencesView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation/Preferences/MapPreferencesView.swift')
-rw-r--r--Map/Presentation/Preferences/MapPreferencesView.swift19
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")