mirror of
https://github.com/insidegui/VirtualBuddy.git
synced 2026-12-02 00:50:32 +08:00
22 lines
448 B
Swift
22 lines
448 B
Swift
import SwiftUI
|
|
|
|
extension View {
|
|
@ViewBuilder
|
|
func toolbarRemovingSidebarToggle() -> some View {
|
|
if #available(macOS 14.0, *) {
|
|
toolbar(removing: .sidebarToggle)
|
|
} else {
|
|
self
|
|
}
|
|
}
|
|
|
|
@ViewBuilder
|
|
func sidebarAdaptableTabViewStyle() -> some View {
|
|
if #available(macOS 15.0, *) {
|
|
tabViewStyle(.sidebarAdaptable)
|
|
} else {
|
|
self
|
|
}
|
|
}
|
|
}
|