From 0d5e6636405dbe332c33c0fb82c7ccccb20f96cb Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 14 Dec 2025 20:21:24 +0100 Subject: Use wmap-parser-swift and tree-sitter-wmap for parsing and highlighting. --- Map/Presentation/PreferencesWindow.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Map/Presentation/PreferencesWindow.swift') 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() } -- cgit