diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 22:45:30 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 22:45:30 +0200 |
| commit | e21ead77ffdff206d1ae17e5ce93ea34c4227414 (patch) | |
| tree | 816908ddf90aaf99a6476ab364f8a13c193b99c4 /Map/Presentation/Theme | |
| parent | c843d34f56c207abcf4b93e424125eea2dc601e0 (diff) | |
Add new fonts and picker style.
Diffstat (limited to 'Map/Presentation/Theme')
| -rw-r--r-- | Map/Presentation/Theme/Color+theme.swift | 45 | ||||
| -rw-r--r-- | Map/Presentation/Theme/Dimensions.swift | 14 | ||||
| -rw-r--r-- | Map/Presentation/Theme/Font+theme.swift | 10 | ||||
| -rw-r--r-- | Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf (renamed from Map/Presentation/Theme/LibertinusSerif-Regular.otf) | bin | 337132 -> 337132 bytes | |||
| -rw-r--r-- | Map/Presentation/Theme/Fonts/Ronzino-Medium.otf (renamed from Map/Presentation/Theme/Ronzino-Medium.otf) | bin | 61604 -> 61604 bytes | |||
| -rw-r--r-- | Map/Presentation/Theme/Fonts/Ronzino-Regular.otf (renamed from Map/Presentation/Theme/Ronzino-Regular.otf) | bin | 59968 -> 59968 bytes | |||
| -rw-r--r-- | Map/Presentation/Theme/NSColor+theme.swift | 26 |
7 files changed, 50 insertions, 45 deletions
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 + // MARK: - General - struct UI { - static let foreground = Color("Foreground") - static let background = Color("Background") - } + struct UI { + static let foreground = Color("Foreground") + static let background = Color("Background") + static let accent = Color.Theme.jasperRed + } - // MARK: - The Map + // 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, - ] + 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/LibertinusSerif-Regular.otf b/Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf Binary files differindex 508f3c0..508f3c0 100644 --- a/Map/Presentation/Theme/LibertinusSerif-Regular.otf +++ b/Map/Presentation/Theme/Fonts/LibertinusSerif-Regular.otf diff --git a/Map/Presentation/Theme/Ronzino-Medium.otf b/Map/Presentation/Theme/Fonts/Ronzino-Medium.otf Binary files differindex 0be8dd5..0be8dd5 100644 --- a/Map/Presentation/Theme/Ronzino-Medium.otf +++ b/Map/Presentation/Theme/Fonts/Ronzino-Medium.otf diff --git a/Map/Presentation/Theme/Ronzino-Regular.otf b/Map/Presentation/Theme/Fonts/Ronzino-Regular.otf Binary files differindex 8b70471..8b70471 100644 --- a/Map/Presentation/Theme/Ronzino-Regular.otf +++ b/Map/Presentation/Theme/Fonts/Ronzino-Regular.otf 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 + } } } |