aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/MapEditor.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-04 22:45:30 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-04 22:45:30 +0200
commite21ead77ffdff206d1ae17e5ce93ea34c4227414 (patch)
tree816908ddf90aaf99a6476ab364f8a13c193b99c4 /Map/Presentation/MapEditor.swift
parentc843d34f56c207abcf4b93e424125eea2dc601e0 (diff)
Add new fonts and picker style.
Diffstat (limited to 'Map/Presentation/MapEditor.swift')
-rw-r--r--Map/Presentation/MapEditor.swift20
1 files changed, 11 insertions, 9 deletions
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")!)
}