Skip to content

Commit

Permalink
macOS 14 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Oct 16, 2023
1 parent e3c2d2a commit b0136e8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ProcessReporter/Views/Setting/BaseSettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ struct BaseSettingView: View {
})
.keyboardShortcut("S")

Button("Setting") {
NSApplication.shared.activate(ignoringOtherApps: true)
Application.openSetting()
if #available(macOS 14, *) {
SettingsLink(label: {
Text("Settings")
}).keyboardShortcut(".", modifiers: .command)
} else {
Button("Setting") {
NSApplication.shared.activate(ignoringOtherApps: true)
Application.openSetting()
}.keyboardShortcut(".", modifiers: .command)
}
.keyboardShortcut(".", modifiers: .command)
}
}
}
Expand Down

0 comments on commit b0136e8

Please sign in to comment.