aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/PreferencesWindow.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation/PreferencesWindow.swift')
-rw-r--r--Map/Presentation/PreferencesWindow.swift12
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()
}