Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Containers/Views/System/SystemStatusControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,13 @@ struct SystemStatusControl: View {
) -> NSMenuItem {
let item = NSMenuItem(title: title, action: action, keyEquivalent: "")
item.image = NSImage(systemSymbolName: symbol, accessibilityDescription: title)
// macOS 27 hides menu item images unless an item asks to show them.
// macOS 27 hides menu item images unless an item asks to show them. The property is only in the macOS 27
// SDK, which comes with Swift 6.4, so earlier Xcode versions leave it out.
#if compiler(>=6.4)
if #available(macOS 27, *) {
item.preferredImageVisibility = .visible
}
#endif
item.isEnabled = isEnabled
item.target = target
return item
Expand Down
Loading