diff --git a/Platform/iOS/VMToolbarUSBMenuView.swift b/Platform/iOS/VMToolbarUSBMenuView.swift index 9061bafbe3..8435ab8998 100644 --- a/Platform/iOS/VMToolbarUSBMenuView.swift +++ b/Platform/iOS/VMToolbarUSBMenuView.swift @@ -41,6 +41,10 @@ struct VMToolbarUSBMenuView: View { } label: { if session.isUsbBusy { Spinner(size: .regular) + } else if #available(iOS 15, macOS 12, visionOS 1, *) { + // cable.connector ships in SF Symbols 3, so it matches the + // stroke weight and sizing of the surrounding toolbar items. + Label("USB", systemImage: "cable.connector") } else { Label("USB", image: "Toolbar USB") } diff --git a/Platform/macOS/Display/VMDisplayWindowController.swift b/Platform/macOS/Display/VMDisplayWindowController.swift index 9ed771f3ab..cb42d66b22 100644 --- a/Platform/macOS/Display/VMDisplayWindowController.swift +++ b/Platform/macOS/Display/VMDisplayWindowController.swift @@ -220,15 +220,27 @@ class VMDisplayWindowController: NSWindowController, UTMVirtualMachineDelegate { window!.recalculateKeyViewLoop() setupStopButtonMenu() setupMainMenu() + setupToolbarIcons() if vm.state == .stopped { enterSuspended(isBusy: false) } else { enterLive() } - + super.windowDidLoad() } + + private func setupToolbarIcons() { + // cable.connector ships in SF Symbols 3 (macOS 12+); use it so the + // USB toolbar item visually matches the surrounding system symbols. + // Older systems fall back to the bundled "Toolbar USB" template + // image from the nib. + if #available(macOS 12, *) { + usbToolbarItem.image = NSImage(systemSymbolName: "cable.connector", + accessibilityDescription: usbToolbarItem.label) + } + } public func requestAutoStart(options: UTMVirtualMachineStartOptions = []) { guard shouldAutoStartVM else {