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/Theme/Color+theme.swift | 51 +++++++++++---------- Map/Presentation/Theme/Dimensions.swift | 14 ++++-- Map/Presentation/Theme/Font+theme.swift | 10 +--- .../Theme/Fonts/LibertinusSerif-Regular.otf | Bin 0 -> 337132 bytes Map/Presentation/Theme/Fonts/Ronzino-Medium.otf | Bin 0 -> 61604 bytes Map/Presentation/Theme/Fonts/Ronzino-Regular.otf | Bin 0 -> 59968 bytes Map/Presentation/Theme/LibertinusSerif-Regular.otf | Bin 337132 -> 0 bytes Map/Presentation/Theme/NSColor+theme.swift | 26 ++++++----- Map/Presentation/Theme/Ronzino-Medium.otf | Bin 61604 -> 0 bytes Map/Presentation/Theme/Ronzino-Regular.otf | Bin 59968 -> 0 bytes 10 files changed, 53 insertions(+), 48 deletions(-) create mode 100644 Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf create mode 100644 Map/Presentation/Theme/Fonts/Ronzino-Medium.otf create mode 100644 Map/Presentation/Theme/Fonts/Ronzino-Regular.otf delete mode 100644 Map/Presentation/Theme/LibertinusSerif-Regular.otf delete mode 100644 Map/Presentation/Theme/Ronzino-Medium.otf delete mode 100644 Map/Presentation/Theme/Ronzino-Regular.otf (limited to 'Map/Presentation/Theme') diff --git a/Map/Presentation/Theme/Color+theme.swift b/Map/Presentation/Theme/Color+theme.swift index ee80e82..22dc18b 100644 --- a/Map/Presentation/Theme/Color+theme.swift +++ b/Map/Presentation/Theme/Color+theme.swift @@ -29,31 +29,32 @@ extension Color { static let lightNeutralGray = Color("Light Neutral Gray") static let darkNeutralGray = Color("Dark Neutral Gray") static let darkerNeutralGray = Color("Darker Neutral Gray") - } - - // MARK: - General - - struct UI { - static let foreground = Color("Foreground") - static let background = Color("Background") - } - // MARK: - The Map - - struct Map { - static let labelColor = Color.Theme.darkSlate - static let axisColor = Color.Theme.darkSlate - static let vertexColor = Color.Theme.darkSlate - static let blockerColor = Color.Theme.jasperRed - static let opportunityColor = Color.Theme.olympicBlue - static let stageForeground = Color.Theme.lightNeutralGray - static let stageBackground = Color.white - static let groupColors = [ - Color.Theme.olympicBlue, - Color.Theme.jasperRed, - Color.Theme.lightPorcelainGreen, - Color.Theme.naplesYellow, - Color.Theme.hermosaPink, - ] + // MARK: - General + + struct UI { + static let foreground = Color("Foreground") + static let background = Color("Background") + static let accent = Color.Theme.jasperRed + } + + // MARK: - The Map + + struct Map { + static let labelColor = Color.Theme.darkSlate + static let axisColor = Color.Theme.darkSlate + static let vertexColor = Color.Theme.darkSlate + static let blockerColor = Color.Theme.jasperRed + static let opportunityColor = Color.Theme.olympicBlue + static let stageForeground = Color.Theme.lightNeutralGray + static let stageBackground = Color.white + static let groupColors = [ + Color.Theme.olympicBlue, + Color.Theme.jasperRed, + Color.Theme.lightPorcelainGreen, + Color.Theme.naplesYellow, + Color.Theme.hermosaPink, + ] + } } } diff --git a/Map/Presentation/Theme/Dimensions.swift b/Map/Presentation/Theme/Dimensions.swift index 2e1fd69..7df3f1a 100644 --- a/Map/Presentation/Theme/Dimensions.swift +++ b/Map/Presentation/Theme/Dimensions.swift @@ -19,10 +19,10 @@ struct Dimensions { // MARK: - Fonts struct FontSize { - static let body: CGFloat = 16 + static let body: CGFloat = 15 static let title: CGFloat = 32 - static let caption: CGFloat = 14 - static let smallControl: CGFloat = 9 + static let caption: CGFloat = 13 + static let smallControl: CGFloat = 11 struct Map { static let note: CGFloat = 12 @@ -55,8 +55,16 @@ struct Dimensions { } // MARK: - The Map + struct Map { static let size = CGSize(width: 1300.0, height: 1000.0) static let padding: CGFloat = 42.0 } + + // MARK: - Assorted Controls + struct EvolutionPicker { + static let radius = 8.0 + static let controlSize = 8.0 + static let controlSpacing = 3.0 + } } diff --git a/Map/Presentation/Theme/Font+theme.swift b/Map/Presentation/Theme/Font+theme.swift index 2fb56f7..cc80fc4 100644 --- a/Map/Presentation/Theme/Font+theme.swift +++ b/Map/Presentation/Theme/Font+theme.swift @@ -24,17 +24,8 @@ extension Font { return .custom("Ronzino", size: size) } - static func ronzinoMedium(size: CGFloat) -> Font { - return .custom("RonzinoMedium", size: size) - } - public struct Theme { - // Map - static let note = Font.system(size: 12, design: .serif) - static let axisLabel = Font.system(size: 14, design: .serif) - static let vertexLabel = Font.system(size: 12, design: .serif) - struct Body { static let regular = Font.ronzino(size: Dimensions.FontSize.body).weight(.regular) static let emphasized = Font.ronzino(size: Dimensions.FontSize.body).weight(.medium) @@ -51,6 +42,7 @@ extension Font { struct SmallControl { static let regular = Font.ronzino(size: Dimensions.FontSize.smallControl).weight(.regular) + static let emphasized = Font.ronzino(size: Dimensions.FontSize.smallControl).weight(.medium) } struct Map { diff --git a/Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf b/Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf new file mode 100644 index 0000000..508f3c0 Binary files /dev/null and b/Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf differ diff --git a/Map/Presentation/Theme/Fonts/Ronzino-Medium.otf b/Map/Presentation/Theme/Fonts/Ronzino-Medium.otf new file mode 100644 index 0000000..0be8dd5 Binary files /dev/null and b/Map/Presentation/Theme/Fonts/Ronzino-Medium.otf differ diff --git a/Map/Presentation/Theme/Fonts/Ronzino-Regular.otf b/Map/Presentation/Theme/Fonts/Ronzino-Regular.otf new file mode 100644 index 0000000..8b70471 Binary files /dev/null and b/Map/Presentation/Theme/Fonts/Ronzino-Regular.otf differ diff --git a/Map/Presentation/Theme/LibertinusSerif-Regular.otf b/Map/Presentation/Theme/LibertinusSerif-Regular.otf deleted file mode 100644 index 508f3c0..0000000 Binary files a/Map/Presentation/Theme/LibertinusSerif-Regular.otf and /dev/null differ diff --git a/Map/Presentation/Theme/NSColor+theme.swift b/Map/Presentation/Theme/NSColor+theme.swift index 61b5498..874764d 100644 --- a/Map/Presentation/Theme/NSColor+theme.swift +++ b/Map/Presentation/Theme/NSColor+theme.swift @@ -15,17 +15,21 @@ import AppKit extension NSColor { - struct Syntax { - static let vertex = NSColor(named: "Vertex") ?? .textColor - static let number = NSColor(named: "Number") ?? .textColor - static let option = NSColor(named: "Option") ?? .textColor - static let symbol = NSColor(named: "Symbol") ?? .textColor - static let match = (NSColor(named: "Light Neutral Gray") ?? .textColor).withAlphaComponent(0.3) - static let highlightMatch = (NSColor(named: "Naples Yellow") ?? .textColor).withAlphaComponent( - 0.3) - } + struct Theme { + struct Syntax { + static let vertex = NSColor(named: "Vertex") ?? .textColor + static let number = NSColor(named: "Number") ?? .textColor + static let option = NSColor(named: "Option") ?? .textColor + static let symbol = NSColor(named: "Symbol") ?? .textColor + static let match = (NSColor(named: "Light Neutral Gray") ?? .textColor).withAlphaComponent( + 0.3) + static let highlightMatch = (NSColor(named: "Naples Yellow") ?? .textColor) + .withAlphaComponent( + 0.3) + } - struct UI { - static let background = NSColor(named: "Background") ?? .windowBackgroundColor + struct UI { + static let background = NSColor(named: "Background") ?? .windowBackgroundColor + } } } diff --git a/Map/Presentation/Theme/Ronzino-Medium.otf b/Map/Presentation/Theme/Ronzino-Medium.otf deleted file mode 100644 index 0be8dd5..0000000 Binary files a/Map/Presentation/Theme/Ronzino-Medium.otf and /dev/null differ diff --git a/Map/Presentation/Theme/Ronzino-Regular.otf b/Map/Presentation/Theme/Ronzino-Regular.otf deleted file mode 100644 index 8b70471..0000000 Binary files a/Map/Presentation/Theme/Ronzino-Regular.otf and /dev/null differ -- cgit