diff --git a/Containers/Views/System/SystemStatusControl.swift b/Containers/Views/System/SystemStatusControl.swift index 4079b07..de5dc9f 100644 --- a/Containers/Views/System/SystemStatusControl.swift +++ b/Containers/Views/System/SystemStatusControl.swift @@ -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