From cd20632b5d58ac466fadc53be82221393f5f0e72 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 10 Aug 2020 08:36:31 +0800 Subject: [PATCH] Adds sidebar toggle image to app assets --- Multiplatform/Shared/AppAssets.swift | 4 ++++ Multiplatform/Shared/SceneNavigationView.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Multiplatform/Shared/AppAssets.swift b/Multiplatform/Shared/AppAssets.swift index 3c0953c2f..244c5fb87 100644 --- a/Multiplatform/Shared/AppAssets.swift +++ b/Multiplatform/Shared/AppAssets.swift @@ -301,6 +301,10 @@ struct AppAssets { return IconImage(coloredImage, isSymbol: true) #endif } + + static var sidebarToggleImage: Image { + return Image(systemName: "sidebar.left") + } #if os(macOS) static var webStatusBarBackground: NSColor = { diff --git a/Multiplatform/Shared/SceneNavigationView.swift b/Multiplatform/Shared/SceneNavigationView.swift index 5fff55137..fdc5d0b5b 100644 --- a/Multiplatform/Shared/SceneNavigationView.swift +++ b/Multiplatform/Shared/SceneNavigationView.swift @@ -107,7 +107,7 @@ struct SceneNavigationView: View { #warning("Use of AppKit in SwiftUI.") NSApp.keyWindow?.firstResponder?.tryToPerform(#selector(NSSplitViewController.toggleSidebar(_:)), with: nil) } label: { - Image(systemName: "sidebar.left") + AppAssets.sidebarToggleImage } .help("Toggle Sidebar") }