diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 17:06:28 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 17:06:28 +0200 |
| commit | c843d34f56c207abcf4b93e424125eea2dc601e0 (patch) | |
| tree | 415dc2d9be4be31e290e1dd1dedb0b630c5e8fc6 /Map/Presentation/Base Components/MapRender | |
| parent | ed10ac191df473c92c4fec495aafa7f569d108c8 (diff) | |
Upgrade to Swift 6
Diffstat (limited to 'Map/Presentation/Base Components/MapRender')
3 files changed, 17 insertions, 11 deletions
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) |