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 }