From 73f875c915097bf1221683c6767f64bbe9c92c1e Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Fri, 18 Sep 2026 07:02:02 +0200 Subject: [PATCH] toolbar(macOS): draw VM power controls as one segmented control macOS 26 draws a single Liquid Glass background behind a run of adjacent toolbar items, so stop, start/pause, and restart read as one undivided button. A space item only splits that background into separate groups. The divider Safari's back/forward and Xcode's run/stop show comes from a segmented control inside one toolbar item, so the nib now defines the three controls as segments of one. Clicking the stop segment still stops the VM, and clicking and holding it still shows the shutdown menu, which now hangs off the segment rather than an NSMenuToolbarItem. Enabling moves to the individual segments. Segment tooltips are localizable, so the existing translations move from the removed items to the segments. An autosaved toolbar item list that names the removed items falls back to the nib default, so existing installs pick up the new control. Segments have no label, so VoiceOver reads their image descriptions. The stop and restart images get localized descriptions the way the USB item's image does, and start/pause already had them. German lacked a "Restart" translation, so the one the removed toolbar item carried moves to Localizable.strings, where the main menu's Restart item uses it too. The group's "Power" label reuses the existing Chinese translations. Assisted-by: Claude:claude-opus-5 --- Platform/de.lproj/Localizable.strings | 3 ++ .../Display/Base.lproj/VMDisplayWindow.xib | 54 +++++-------------- .../Display/VMDisplayWindowController.swift | 49 ++++++++++++----- .../Display/de.lproj/VMDisplayWindow.strings | 36 ++++--------- .../es-419.lproj/VMDisplayWindow.strings | 36 ++++--------- .../Display/fi.lproj/VMDisplayWindow.strings | 30 +++-------- .../Display/fr.lproj/VMDisplayWindow.strings | 30 +++-------- .../Display/it.lproj/VMDisplayWindow.strings | 36 ++++--------- .../Display/ja.lproj/VMDisplayWindow.strings | 36 ++++--------- .../Display/ko.lproj/VMDisplayWindow.strings | 36 ++++--------- .../Display/pl.lproj/VMDisplayWindow.strings | 30 +++-------- .../Display/ru.lproj/VMDisplayWindow.strings | 36 ++++--------- .../zh-HK.lproj/VMDisplayWindow.strings | 42 ++++++--------- .../zh-Hans.lproj/VMDisplayWindow.strings | 42 ++++++--------- .../zh-Hant.lproj/VMDisplayWindow.strings | 36 ++++--------- 15 files changed, 165 insertions(+), 367 deletions(-) diff --git a/Platform/de.lproj/Localizable.strings b/Platform/de.lproj/Localizable.strings index e26cbed9..b2c6969e 100644 --- a/Platform/de.lproj/Localizable.strings +++ b/Platform/de.lproj/Localizable.strings @@ -697,6 +697,9 @@ /* No comment provided by engineer. */ "Resizing is experimental and could result in data loss. You are strongly encouraged to back-up this VM before proceeding. Would you like to resize to %@ GiB?" = "Das Ändern der Größe ist eine experimentelle Funktion und könnte Datenverlust nach sich ziehen. Machen Sie vorher ein Backup. Möchten Sie die Größe auf $@ GiB ändern?"; +/* VMDisplayWindowController */ +"Restart" = "Neustarten"; + /* UTMVirtualMachine */ "Resuming" = "Wird fortgesetzt"; diff --git a/Platform/macOS/Display/Base.lproj/VMDisplayWindow.xib b/Platform/macOS/Display/Base.lproj/VMDisplayWindow.xib index 6f34885f..fb581383 100644 --- a/Platform/macOS/Display/Base.lproj/VMDisplayWindow.xib +++ b/Platform/macOS/Display/Base.lproj/VMDisplayWindow.xib @@ -17,13 +17,11 @@ + - - - @@ -107,44 +105,22 @@ - - - - - - - - - - - +