diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-14 20:21:24 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-15 00:10:39 +0100 |
| commit | 0d5e6636405dbe332c33c0fb82c7ccccb20f96cb (patch) | |
| tree | a9cda2b711bbfc9277d66310440dd965b16682fc /Map/Presentation/PreferencesWindow.swift | |
| parent | a5ae7aedc840a38505b3181f4e5ba92e90d94fa1 (diff) | |
Use wmap-parser-swift and tree-sitter-wmap for parsing and highlighting.
Diffstat (limited to 'Map/Presentation/PreferencesWindow.swift')
| -rw-r--r-- | Map/Presentation/PreferencesWindow.swift | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Map/Presentation/PreferencesWindow.swift b/Map/Presentation/PreferencesWindow.swift index fa5bd4c..3a50119 100644 --- a/Map/Presentation/PreferencesWindow.swift +++ b/Map/Presentation/PreferencesWindow.swift @@ -93,7 +93,8 @@ struct PreferencesWindow: View { selectedTab == tab ? Color.Theme.UI.accent : Color.background.opacity(0.01) ) .foregroundColor(selectedTab == tab ? Color.white : Color.Theme.UI.foreground) - .cornerRadius(Dimensions.Preferences.Toolbar.radius) + .clipShape(clipShape()) + .padding(.horizontal, 2.0) } .buttonStyle(.plain) } @@ -101,8 +102,17 @@ struct PreferencesWindow: View { } } } + + private func clipShape() -> AnyShape { + if #available(macOS 26.0, *) { + AnyShape(RoundedRectangle(cornerRadius: Dimensions.Preferences.Toolbar.glassRadius)) + } else { + AnyShape(RoundedRectangle(cornerRadius: Dimensions.Preferences.Toolbar.radius)) + } + } } + #Preview { PreferencesWindow() } |