diff options
Diffstat (limited to 'Map/Presentation/Base Components')
6 files changed, 27 insertions, 20 deletions
diff --git a/Map/Presentation/Base Components/EvolutionPicker.swift b/Map/Presentation/Base Components/EvolutionPicker.swift index 2768540..2df4a7f 100644 --- a/Map/Presentation/Base Components/EvolutionPicker.swift +++ b/Map/Presentation/Base Components/EvolutionPicker.swift @@ -21,21 +21,22 @@ struct EvolutionPicker: View { var body: some View { Picker("Evolution", selection: $selectedEvolution) { ForEach(StageType.types) { stage in - Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0) + Text(Stage.title(stage)).font(.Theme.Body.regular).tag(stage).padding(4.0) } Divider() ForEach(StageType.characteristics) { stage in - Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0).font(.Theme.body) + Text(Stage.title(stage)).font(.Theme.Body.regular).tag(stage).padding(4.0).font( + .Theme.Body.regular) } Divider() ForEach(StageType.properties) { stage in - Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0) + Text(Stage.title(stage)).font(.Theme.Body.regular).tag(stage).padding(4.0) } Divider() ForEach(StageType.custom) { stage in - Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0) + Text(Stage.title(stage)).font(.Theme.Body.regular).tag(stage).padding(4.0) } - }.font(.Theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0) + }.font(.Theme.Body.regular).padding(.horizontal, 8.0).padding(.vertical, 4.0) } } diff --git a/Map/Presentation/Base Components/MapRender/MapAxes.swift b/Map/Presentation/Base Components/MapRender/MapAxes.swift index 4f64135..1c0a147 100644 --- a/Map/Presentation/Base Components/MapRender/MapAxes.swift +++ b/Map/Presentation/Base Components/MapRender/MapAxes.swift @@ -36,11 +36,11 @@ struct MapAxes: View { }.stroke(Color.Map.axisColor, lineWidth: lineWidth * 2) // Y Labels - Text("Visible").font(.Theme.axisLabel).foregroundColor(.Map.labelColor).rotationEffect( + Text("Visible").font(.Theme.Map.axisLabel).foregroundColor(.Map.labelColor).rotationEffect( Angle(degrees: -90.0) ) .offset(CGSize(width: -35.0, height: 0.0)) - Text("Invisible").font(.Theme.axisLabel).foregroundColor(.Map.labelColor).rotationEffect( + Text("Invisible").font(.Theme.Map.axisLabel).foregroundColor(.Map.labelColor).rotationEffect( Angle(degrees: -90.0) ) .offset(CGSize(width: -40.0, height: mapSize.height - 20)) @@ -48,36 +48,36 @@ struct MapAxes: View { // X Labels Text("Uncharted") - .font(.Theme.axisLabel) + .font(.Theme.Map.axisLabel) .foregroundColor(.Map.labelColor) .frame(width: mapSize.width / 4, height: stageHeight / 2.0, alignment: .topLeading) .offset(CGSize(width: 0.0, height: -stageHeight / 4.0)) Text("Industrialised") - .font(.Theme.axisLabel) + .font(.Theme.Map.axisLabel) .foregroundColor(.Map.labelColor) .frame(width: mapSize.width / 4, height: stageHeight / 2.0, alignment: .topLeading) .offset(CGSize(width: mapSize.width - 100.0, height: -stageHeight / 4.0)) Text(evolution.i) - .font(.Theme.axisLabel) + .font(.Theme.Map.axisLabel) .foregroundColor(.Map.labelColor) .frame(width: w(stages[0]), height: stageHeight, alignment: .topLeading) .offset(CGSize(width: 0.0, height: mapSize.height + padding)) Text(evolution.ii) - .font(.Theme.axisLabel) + .font(.Theme.Map.axisLabel) .foregroundColor(.Map.labelColor) .frame(width: w(stages[1]) - w(stages[0]), height: stageHeight, alignment: .topLeading) .offset(CGSize(width: w(stages[0]), height: mapSize.height + padding)) Text(evolution.iii) - .font(.Theme.axisLabel) + .font(.Theme.Map.axisLabel) .foregroundColor(.Map.labelColor) .frame(width: w(stages[2]) - w(stages[1]), height: stageHeight, alignment: .topLeading) .offset(CGSize(width: w(stages[1]), height: mapSize.height + padding)) Text(evolution.iv) - .font(.Theme.axisLabel) + .font(.Theme.Map.axisLabel) .foregroundColor(.Map.labelColor) .frame(width: mapSize.width - w(stages[2]), height: stageHeight, alignment: .topLeading) .offset(CGSize(width: w(stages[2]), height: mapSize.height + padding)) diff --git a/Map/Presentation/Base Components/MapRender/MapNotes.swift b/Map/Presentation/Base Components/MapRender/MapNotes.swift index 0119154..16c61ba 100644 --- a/Map/Presentation/Base Components/MapRender/MapNotes.swift +++ b/Map/Presentation/Base Components/MapRender/MapNotes.swift @@ -24,8 +24,10 @@ struct MapNotes: View { var body: some View { ForEach(notes, id: \.id) { note in - Text(note.text.replacingOccurrences(of: "\\n", with: "\n")).font(.Theme.note) - .padding(2.0) + Text(note.text.replacingOccurrences(of: "\\n", with: "\n")) + .font(.Theme.Map.note) + .lineSpacing(Dimensions.LineHeight.Map.note - Dimensions.FontSize.Map.note) + .padding(Dimensions.Spacing.cozy) .background(.white) .foregroundColor(.Map.labelColor) .border(Color.Map.vertexColor, width: lineWidth) diff --git a/Map/Presentation/Base Components/MapRender/MapVertices.swift b/Map/Presentation/Base Components/MapRender/MapVertices.swift index d8e3b88..1f6cf1a 100644 --- a/Map/Presentation/Base Components/MapRender/MapVertices.swift +++ b/Map/Presentation/Base Components/MapRender/MapVertices.swift @@ -28,7 +28,11 @@ struct MapVertices: View { ForEach(vertices, id: \.id) { vertex in ZStack(alignment: .topLeading) { getVertexShape(vertex).fill(Color.Map.vertexColor) - Text(vertex.label.replacingOccurrences(of: "\\n", with: "\n")).font(.Theme.vertexLabel) + Text(vertex.label.replacingOccurrences(of: "\\n", with: "\n")) + .font(.Theme.Map.vertexLabel) + .lineSpacing( + Dimensions.LineHeight.Map.vertexLabel - Dimensions.FontSize.Map.vertexLabel + ) .foregroundColor(.Map.labelColor) .shadow(color: .white, radius: 0, x: -0.5, y: -0.5) .shadow(color: .white, radius: 0, x: 0.5, y: 0.5) diff --git a/Map/Presentation/Base Components/MapTextEditor.swift b/Map/Presentation/Base Components/MapTextEditor.swift index ff98203..3c5c824 100644 --- a/Map/Presentation/Base Components/MapTextEditor.swift +++ b/Map/Presentation/Base Components/MapTextEditor.swift @@ -150,7 +150,7 @@ extension MapTextEditorController: NSTextStorageDelegate { } } - private func colorizeText(textStorage: NSTextStorage) { + nonisolated private func colorizeText(textStorage: NSTextStorage) { let range = NSMakeRange(0, textStorage.length) var matches = vertexRegex.matches(in: textStorage.string, options: [], range: range) diff --git a/Map/Presentation/Base Components/SearchBar.swift b/Map/Presentation/Base Components/SearchBar.swift index e5182c5..cd2c378 100644 --- a/Map/Presentation/Base Components/SearchBar.swift +++ b/Map/Presentation/Base Components/SearchBar.swift @@ -48,19 +48,19 @@ struct SearchBar: View { Spacer() Button(action: onPrevious) { Image(systemName: "chevron.left") - .font(.Theme.smallControl) + .font(.Theme.SmallControl.regular) }.keyboardShortcut( "g", modifiers: EventModifiers([.command, .shift]) ).help("Find Previous (⇧⌘G)") Button(action: onNext) { Image(systemName: "chevron.right") - .font(.Theme.smallControl) + .font(.Theme.SmallControl.regular) }.keyboardShortcut( "g", modifiers: EventModifiers([.command]) ).help("Find Next (⌘G)") Button(action: onDismiss) { Text("Done") - .font(.Theme.smallControl) + .font(.Theme.SmallControl.regular) }.keyboardShortcut(.escape, modifiers: EventModifiers()) .help("Done (⎋)") }.padding(4.0) |