From 403b83badcac4bf6d6d76e56b47e36d9f548c0b2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 29 Jun 2026 23:42:30 +0200 Subject: [PATCH] Show queue mode label and split bottom bar on macOS On macOS the queue sheet's mode selector now shows both icon and text and shares a single bottom toolbar bar with the Close button, pinned to opposite edges. --- .../Views/Player/QueueManagementSheet.swift | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Yattee/Views/Player/QueueManagementSheet.swift b/Yattee/Views/Player/QueueManagementSheet.swift index f29ba11c..b751f0a0 100644 --- a/Yattee/Views/Player/QueueManagementSheet.swift +++ b/Yattee/Views/Player/QueueManagementSheet.swift @@ -122,11 +122,35 @@ struct QueueManagementSheet: View { .navigationBarTitleDisplayMode(.inline) #endif .toolbar { + #if !os(macOS) ToolbarItem(placement: .cancellationAction) { queueModeMenu } sheetCloseToolbarItem { performDismiss() } + #endif } + #if os(macOS) + // On macOS the mode selector and Close button share one bottom bar, + // with the mode selector pinned to the leading edge so it can show + // both icon and text. + .safeAreaInset(edge: .bottom) { + VStack(spacing: 0) { + Divider() + HStack { + queueModeMenu + Spacer() + Button(role: .cancel) { performDismiss() } label: { + Text(String(localized: "common.close")) + } + .keyboardShortcut(.cancelAction) + .buttonStyle(.borderedProminent) + } + .padding(.horizontal, 16) + .padding(.vertical, 10) + } + .background(.bar) + } + #endif } .presentationDragIndicator(.visible) #if os(iOS) @@ -459,11 +483,20 @@ struct QueueManagementSheet: View { } label: { HStack(spacing: 4) { Image(systemName: playerState?.queueMode.icon ?? "list.bullet") + #if os(macOS) + Text(playerState?.queueMode.displayName ?? QueueMode.normal.displayName) + #endif Image(systemName: "chevron.down") .font(.caption2) } .foregroundStyle(.tint) } + #if os(macOS) + // Default Menu style stretches full-width on macOS; keep the button + // hugging its label so it sits tidily in the bottom-left bar. + .menuStyle(.borderlessButton) + .fixedSize() + #endif #endif }