mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-04-24 14:37:38 +00:00
fix: Preference button on toolbar not working on Mac OS 13 Ventura
This commit is contained in:
parent
13e829ca88
commit
bb8676b620
1 changed files with 7 additions and 1 deletions
|
|
@ -86,7 +86,13 @@ struct MainToolbarModifier: ViewModifier {
|
||||||
.keyboardShortcut(KeyboardShortcut("i", modifiers: [.command, .option]))
|
.keyboardShortcut(KeyboardShortcut("i", modifiers: [.command, .option]))
|
||||||
.help("InfoDescription")
|
.help("InfoDescription")
|
||||||
|
|
||||||
Button(action: { NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil) }, label: {
|
Button(action: {
|
||||||
|
if #available(macOS 13, *) {
|
||||||
|
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
|
||||||
|
} else {
|
||||||
|
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
|
||||||
|
}
|
||||||
|
}, label: {
|
||||||
Label("Preferences", systemImage: "gearshape")
|
Label("Preferences", systemImage: "gearshape")
|
||||||
})
|
})
|
||||||
.help("PreferencesDescription")
|
.help("PreferencesDescription")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue