diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-11 09:27:49 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-11 09:27:49 +0200 |
| commit | 8564439356f4bcc3e21b19738eb87b4c0722c623 (patch) | |
| tree | 1465f4e48be83d255e5c68de804ba940db238bea /Map/Presentation/Theme | |
| parent | ff3619fdf3fce82d95124654a18b66ca3ed380cd (diff) | |
Add missing vertex detection
Diffstat (limited to 'Map/Presentation/Theme')
| -rw-r--r-- | Map/Presentation/Theme/NSColor+theme.swift | 1 | ||||
| -rw-r--r-- | Map/Presentation/Theme/NSFont+theme.swift | 31 |
2 files changed, 31 insertions, 1 deletions
diff --git a/Map/Presentation/Theme/NSColor+theme.swift b/Map/Presentation/Theme/NSColor+theme.swift index e10f51e..b2ff106 100644 --- a/Map/Presentation/Theme/NSColor+theme.swift +++ b/Map/Presentation/Theme/NSColor+theme.swift @@ -28,6 +28,7 @@ extension NSColor { static let highlightMatch = (NSColor(named: "Naples Yellow") ?? .textColor) .withAlphaComponent( 0.3) + static let error = (NSColor(named: "Jasper Red") ?? .textColor) } struct UI { diff --git a/Map/Presentation/Theme/NSFont+theme.swift b/Map/Presentation/Theme/NSFont+theme.swift index 5d8d8dd..cd119f2 100644 --- a/Map/Presentation/Theme/NSFont+theme.swift +++ b/Map/Presentation/Theme/NSFont+theme.swift @@ -15,9 +15,38 @@ import AppKit extension NSFont { + + static func libertinus(size: CGFloat) -> NSFont { + return NSFont(name: "Libertinus Serif", size: size) ?? .systemFont(ofSize: size) + } + + static func ronzino(size: CGFloat) -> NSFont { + return NSFont(name: "Ronzino", size: size) ?? .systemFont(ofSize: size) + } + public struct Theme { + + struct Body { + @MainActor static let regular = NSFont.ronzino(size: Dimensions.FontSize.body) + @MainActor static let emphasized = NSFont.ronzino(size: Dimensions.FontSize.body) + } + + struct Title { + @MainActor static let emphasized = NSFont.libertinus(size: Dimensions.FontSize.title) + } + + struct Caption { + @MainActor static let regular = NSFont.ronzino(size: Dimensions.FontSize.caption) + @MainActor static let emphasized = NSFont.ronzino(size: Dimensions.FontSize.caption) + } + + struct SmallControl { + @MainActor static let regular = NSFont.ronzino(size: Dimensions.FontSize.smallControl) + @MainActor static let emphasized = NSFont.ronzino(size: Dimensions.FontSize.smallControl) + } + struct Editor { - static var regular: NSFont { + @MainActor static var regular: NSFont { if UserDefaults.standard.bool(forKey: "useCustomEditorFont"), let customEditorFontName = UserDefaults.standard.string(forKey: "customEditorFontName"), !customEditorFontName.isEmpty |