aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/MapEditor.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation/MapEditor.swift')
-rw-r--r--Map/Presentation/MapEditor.swift13
1 files changed, 8 insertions, 5 deletions
diff --git a/Map/Presentation/MapEditor.swift b/Map/Presentation/MapEditor.swift
index 73302df..11545e2 100644
--- a/Map/Presentation/MapEditor.swift
+++ b/Map/Presentation/MapEditor.swift
@@ -22,13 +22,16 @@ struct MapEditor: View {
private let changeDebouncer: Debouncer = Debouncer(seconds: 0.05)
- @AppStorage("viewStyle") var viewStyle: ViewStyle = .horizontal
- @AppStorage("useCustomEditorFont") var useCustomEditorFont: Bool = false
- @AppStorage("customEditorFontName") var customEditorFontName: String = "Menlo"
- @AppStorage("editorFontSize") var editorFontSize: Double = 14
+ @AppStorage("viewStyle") var viewStyle: ViewStyle =
+ ViewStyle(rawValue: UserPreferences.Defaults.viewStyle) ?? .horizontal
+ @AppStorage("useCustomEditorFont") var useCustomEditorFont: Bool = UserPreferences.Defaults
+ .useCustomEditorFont
+ @AppStorage("customEditorFontName") var customEditorFontName: String = UserPreferences.Defaults
+ .customEditorFontName
+ @AppStorage("editorFontSize") var editorFontSize: Double = UserPreferences.Defaults.editorFontSize
let zoomRange = Constants.kMinZoom...Constants.kMaxZoom
- @AppStorage("zoom") var zoom = 1.0
+ @AppStorage("zoom") var zoom = UserPreferences.Defaults.zoom
@State var lastZoom = 1.0
@State var searchTerm = ""
@State var selectedTerm = 0