From e21ead77ffdff206d1ae17e5ce93ea34c4227414 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Fri, 4 Jul 2025 22:45:30 +0200 Subject: Add new fonts and picker style. --- Map/Presentation/MapEditor.swift | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'Map/Presentation/MapEditor.swift') diff --git a/Map/Presentation/MapEditor.swift b/Map/Presentation/MapEditor.swift index 1e25ce8..5dc1adb 100644 --- a/Map/Presentation/MapEditor.swift +++ b/Map/Presentation/MapEditor.swift @@ -92,11 +92,12 @@ struct MapEditor: View { adaptiveStack { ZStack(alignment: .topLeading) { MapTextEditor(document: $document, highlightRanges: results, selectedRange: selectedTerm) - .background(Color.UI.background) - .foregroundColor(Color.UI.foreground) + .background(Color.Theme.UI.background) + .foregroundColor(Color.Theme.UI.foreground) .frame(minHeight: 96.0) - }.padding(.top, 8.0).padding(.leading, 8.0).background(Color.UI.background).cornerRadius( - 5.0) + } + .background(Color.Theme.UI.background) + .cornerRadius(5.0) GeometryReader { geometry in ScrollView([.horizontal, .vertical]) { MapRenderView( @@ -104,7 +105,7 @@ struct MapEditor: View { ).scaleEffect(zoom, anchor: .center).frame( width: (Dimensions.Map.size.width + 2 * Dimensions.Map.padding) * zoom, height: (Dimensions.Map.size.height + 2 * Dimensions.Map.padding) * zoom) - }.background(Color.UI.background) + }.background(Color.Theme.UI.background) .gesture( MagnificationGesture() .onChanged { value in @@ -140,11 +141,12 @@ struct MapEditor: View { ).frame(width: 200).padding(.trailing, 10.0) }.padding(4.0) }.toolbar { - HStack { + ToolbarItem(placement: .primaryAction) { EvolutionPicker(selectedEvolution: $selectedEvolution) } - }.focusedSceneValue(\.isSearching, $isSearching) - .focusedSceneValue(\.selectedEvolution, $selectedEvolution) + } + .focusedSceneValue(\.isSearching, $isSearching) + .focusedSceneValue(\.selectedEvolution, $selectedEvolution) } @ViewBuilder @@ -173,5 +175,5 @@ struct MapEditor: View { } #Preview { - MapEditor(document: .constant(MapDocument()), url: URL(filePath: "test.png")!) + MapEditor(document: .constant(MapDocument()), url: URL(filePath: "test.wmap")!) } -- cgit