Skip to content

Commit

Permalink
Refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
FastestMolasses committed Sep 8, 2023
1 parent 89395a9 commit 72a7184
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CodeEdit/Features/WindowCommands/ViewCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct ViewCommands: Commands {
}
}
.disabled(navigationSplitViewVisibility == nil)
.keyboardShortcut("s", modifiers: [.control, .command])
.keyboardShortcut("0", modifiers: [.command])

Button("\(inspectorVisibility == false ? "Show" : "Hide") Inspector") {
inspectorVisibility?.toggle()
Expand All @@ -93,7 +93,7 @@ struct ViewCommands: Commands {
windowController?.toggleFirstPanel()
}
.disabled(windowController == nil)
.keyboardShortcut("s", modifiers: [.control, .command])
.keyboardShortcut("0", modifiers: [.command])
.onReceive(NSApp.publisher(for: \.keyWindow)) { window in
windowController = window?.windowController as? CodeEditWindowController
}
Expand Down
3 changes: 1 addition & 2 deletions CodeEdit/WindowSplitView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import SwiftUI

struct WindowSplitView: View {
@StateObject var workspace: WorkspaceDocument
@StateObject var navigatorViewModel = NavigatorSidebarViewModel()
@State var visibility: NavigationSplitViewVisibility = .all
@State var showInspector = true
@State var window: NSWindow = .init()

var body: some View {
WindowObserver(window: window) {
NavigationSplitView(columnVisibility: $visibility) {
NavigatorSidebarView(workspace: workspace, viewModel: navigatorViewModel)
NavigatorSidebarView(workspace: workspace, viewModel: NavigatorSidebarViewModel())
.toolbar {
ToolbarItem {
Button {
Expand Down

0 comments on commit 72a7184

Please sign in to comment.