mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fix Settings Button
This commit is contained in:
parent
4b9fedf86e
commit
8ca9597f26
1 changed files with 23 additions and 6 deletions
|
|
@ -301,12 +301,7 @@ struct SettingsView: View {
|
|||
}
|
||||
.navigationSplitViewStyle(.balanced)
|
||||
.toolbar(removing: .sidebarToggle)
|
||||
.toolbar {
|
||||
Button("") {} // Empty label, does nothing
|
||||
.controlSize(.extraLarge)
|
||||
.opacity(0) // Invisible, but reserves space for a consistent look between tabs
|
||||
.disabled(true)
|
||||
}
|
||||
.toolbar { toolbarSpacingShim }
|
||||
.environmentObject(highlightCoordinator)
|
||||
.formStyle(.grouped)
|
||||
.frame(width: 700)
|
||||
|
|
@ -343,6 +338,28 @@ struct SettingsView: View {
|
|||
availableTabs.contains(selectedTab) ? selectedTab : (availableTabs.first ?? .general)
|
||||
}
|
||||
|
||||
@ToolbarContentBuilder
|
||||
private var toolbarSpacingShim: some ToolbarContent {
|
||||
if #available(macOS 26.0, *) {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
toolbarSpacerView
|
||||
}
|
||||
.sharedBackgroundVisibility(.hidden)
|
||||
} else {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
toolbarSpacerView
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var toolbarSpacerView: some View {
|
||||
Color.clear
|
||||
.frame(width: 96, height: 32)
|
||||
.allowsHitTesting(false)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
|
||||
private var filteredTabs: [SettingsTab] {
|
||||
tabsMatchingSearch(searchText)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue