Skip to content

Commit

Permalink
Improves macOS UI.
Browse files Browse the repository at this point in the history
- Add the shortcut for favorite as "⌘F".
- Remove undo/redo menu.
- Fixes an issue to show doubled detail view in macOS Monterey.
  • Loading branch information
mntone committed Jan 4, 2024
1 parent 28672f4 commit 6549564
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/App/MAApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ struct MAApp: SwiftUI.App {
#endif
#if os(macOS)
.commands {
CommandGroup(replacing: .undoRedo) {
}

CommandGroup(replacing: .appInfo) {
Button("About Prof. Monster") {
NSApplication.shared.orderFrontStandardAboutPanel(options: [
Expand Down
1 change: 1 addition & 0 deletions src/App/Views/Details/FavoriteButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct FavoriteButton<ViewModel: FavoriteViewModel>: View {
#if os(iOS)
.tint(.yellow)
#endif
.keyboardShortcut("F", modifiers: .command)
#endif
}
}
7 changes: 0 additions & 7 deletions src/App/Views/Navigations/NavigationSplitViewHost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,8 @@ struct NavigationSplitViewHostBackport: View {
#if os(macOS)
Sidebar(viewModel: viewModel, selection: $selectedGameID)
MonsterList(viewModel: gameViewModel, selection: $selectedMonsterID)

if let monsterViewModel {
MonsterView(viewModel: monsterViewModel)
} else {
Color.monsterBackground.ignoresSafeArea()
}
#else
SidebarBackport(viewModel: viewModel, selection: $selectedGameID)

GamePage(viewModel: gameViewModel) { item in
MonsterSelectableListItem(viewModel: item, selection: $selectedMonsterID)
}
Expand Down

0 comments on commit 6549564

Please sign in to comment.