mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Add Toggle Sidebar button for macOS
This commit is contained in:
parent
2a75d0a1d4
commit
f0d1b74e34
@ -100,6 +100,16 @@ struct AppSidebarNavigation: View {
|
||||
"Current User: \(accounts.current?.description ?? "Not set")"
|
||||
)
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
ToolbarItem(placement: .navigation) {
|
||||
Button {
|
||||
NSApp.keyWindow?.firstResponder?.tryToPerform(#selector(NSSplitViewController.toggleSidebar(_:)), with: nil)
|
||||
} label: {
|
||||
Label("Toggle Sidebar", systemImage: "sidebar.left")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user