mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-04-26 14:57:37 +00:00
Merge pull request #444 from XcodesOrg/matt/SettingsLinkSonoma
fix: settings link on Sonoma not working
This commit is contained in:
commit
5b18a90f81
2 changed files with 19 additions and 12 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -8,10 +8,10 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: macos-12
|
runs-on: macos-13
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_14.2.app
|
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app
|
||||||
run: xcodebuild test -scheme Xcodes
|
run: xcodebuild test -scheme Xcodes
|
||||||
|
|
|
||||||
|
|
@ -86,16 +86,23 @@ struct MainToolbarModifier: ViewModifier {
|
||||||
.keyboardShortcut(KeyboardShortcut("i", modifiers: [.command, .option]))
|
.keyboardShortcut(KeyboardShortcut("i", modifiers: [.command, .option]))
|
||||||
.help("InfoDescription")
|
.help("InfoDescription")
|
||||||
|
|
||||||
Button(action: {
|
if #available(macOS 14, *) {
|
||||||
if #available(macOS 13, *) {
|
SettingsLink(label: {
|
||||||
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
|
Label("Preferences", systemImage: "gearshape")
|
||||||
} else {
|
})
|
||||||
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
|
.help("PreferencesDescription")
|
||||||
}
|
} else {
|
||||||
}, label: {
|
Button(action: {
|
||||||
Label("Preferences", systemImage: "gearshape")
|
if #available(macOS 13, *) {
|
||||||
})
|
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
|
||||||
.help("PreferencesDescription")
|
} else {
|
||||||
|
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
|
||||||
|
}
|
||||||
|
}, label: {
|
||||||
|
Label("Preferences", systemImage: "gearshape")
|
||||||
|
})
|
||||||
|
.help("PreferencesDescription")
|
||||||
|
}
|
||||||
|
|
||||||
TextField("Search", text: $searchText)
|
TextField("Search", text: $searchText)
|
||||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue