Adds sidebar toggle image to app assets
This commit is contained in:
parent
dadff04da5
commit
cd20632b5d
@ -302,6 +302,10 @@ struct AppAssets {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static var sidebarToggleImage: Image {
|
||||||
|
return Image(systemName: "sidebar.left")
|
||||||
|
}
|
||||||
|
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
static var webStatusBarBackground: NSColor = {
|
static var webStatusBarBackground: NSColor = {
|
||||||
return NSColor(named: "WebStatusBarBackground")!
|
return NSColor(named: "WebStatusBarBackground")!
|
||||||
|
@ -107,7 +107,7 @@ struct SceneNavigationView: View {
|
|||||||
#warning("Use of AppKit in SwiftUI.")
|
#warning("Use of AppKit in SwiftUI.")
|
||||||
NSApp.keyWindow?.firstResponder?.tryToPerform(#selector(NSSplitViewController.toggleSidebar(_:)), with: nil)
|
NSApp.keyWindow?.firstResponder?.tryToPerform(#selector(NSSplitViewController.toggleSidebar(_:)), with: nil)
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "sidebar.left")
|
AppAssets.sidebarToggleImage
|
||||||
}
|
}
|
||||||
.help("Toggle Sidebar")
|
.help("Toggle Sidebar")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user