aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/MapEditor.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-09-16 20:37:27 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2024-09-16 20:37:27 +0200
commitbe897af3bd7cc010c1aa496d5b1faf8a2e1f82ed (patch)
tree1420ad1ea92f9125bfd1d775913dd8dbc310dae6 /Map/Presentation/MapEditor.swift
parent144915635bdfc90445321189914929a911fe77d4 (diff)
Address the lint warnings
Diffstat (limited to 'Map/Presentation/MapEditor.swift')
-rw-r--r--Map/Presentation/MapEditor.swift38
1 files changed, 18 insertions, 20 deletions
diff --git a/Map/Presentation/MapEditor.swift b/Map/Presentation/MapEditor.swift
index d7c93dd..d62d4ad 100644
--- a/Map/Presentation/MapEditor.swift
+++ b/Map/Presentation/MapEditor.swift
@@ -1,19 +1,17 @@
-/*
- Copyright (C) 2024 Rubén Beltrán del Río
+// Copyright (C) 2024 Rubén Beltrán del Río
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see https://map.tranquil.systems.
- */
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see https://map.tranquil.systems.
import SwiftUI
struct MapEditor: View {
@@ -89,10 +87,10 @@ struct MapEditor: View {
adaptiveStack {
ZStack(alignment: .topLeading) {
MapTextEditor(document: $document, highlightRanges: results, selectedRange: selectedTerm)
- .background(Color.ui.background)
- .foregroundColor(Color.ui.foreground)
+ .background(Color.UI.background)
+ .foregroundColor(Color.UI.foreground)
.frame(minHeight: 96.0)
- }.padding(.top, 8.0).padding(.leading, 8.0).background(Color.ui.background).cornerRadius(
+ }.padding(.top, 8.0).padding(.leading, 8.0).background(Color.UI.background).cornerRadius(
5.0)
GeometryReader { geometry in
ScrollView([.horizontal, .vertical]) {
@@ -101,7 +99,7 @@ struct MapEditor: View {
).scaleEffect(zoom, anchor: .center).frame(
width: (Dimensions.mapSize.width + 2 * Dimensions.mapPadding) * zoom,
height: (Dimensions.mapSize.height + 2 * Dimensions.mapPadding) * zoom)
- }.background(Color.ui.background)
+ }.background(Color.UI.background)
.gesture(
MagnificationGesture()
.onChanged { value in
@@ -122,16 +120,16 @@ struct MapEditor: View {
value: $zoom, in: zoomRange, step: 0.1,
label: {
Text(formatZoom(zoom))
- .font(.theme.smallControl)
+ .font(.Theme.smallControl)
},
minimumValueLabel: {
Image(systemName: "minus.magnifyingglass")
- .font(.theme.smallControl)
+ .font(.Theme.smallControl)
.help("Zoom Out (⌘-)")
},
maximumValueLabel: {
Image(systemName: "plus.magnifyingglass")
- .font(.theme.smallControl)
+ .font(.Theme.smallControl)
.help("Zoom In (⌘+)")
}
).frame(width: 200).padding(.trailing, 10.0)