From 7cb068c8000697a4727a86623c4b43f9a6d7f404 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 20 May 2026 09:15:27 +0200 Subject: [PATCH] Fix Add to Playlist sheet layout on macOS The sheet collapsed to an empty strip because a List inside a sheet has no intrinsic height on macOS. Add an explicit minimum frame like other sheets, gate presentationDetents to iOS, and replace the prominent xmark toolbar button with a native Close button on macOS. --- Yattee/Views/Video/PlaylistSelectorSheet.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Yattee/Views/Video/PlaylistSelectorSheet.swift b/Yattee/Views/Video/PlaylistSelectorSheet.swift index a7a2237e..6b45984e 100644 --- a/Yattee/Views/Video/PlaylistSelectorSheet.swift +++ b/Yattee/Views/Video/PlaylistSelectorSheet.swift @@ -89,6 +89,13 @@ struct PlaylistSelectorSheet: View { .navigationBarTitleDisplayMode(.inline) #endif .toolbar { + #if os(macOS) + ToolbarItem(placement: .cancellationAction) { + Button(String(localized: "common.close"), role: .cancel) { + dismiss() + } + } + #else ToolbarItem(placement: .confirmationAction) { Button(role: .cancel) { dismiss() @@ -97,6 +104,7 @@ struct PlaylistSelectorSheet: View { .labelStyle(.iconOnly) } } + #endif } #endif .sheet(isPresented: $showingNewPlaylist) { @@ -114,7 +122,12 @@ struct PlaylistSelectorSheet: View { loadPlaylists() } } + #if os(iOS) .presentationDetents([.medium, .large]) + #endif + #if os(macOS) + .frame(minWidth: 450, minHeight: 500) + #endif } private func loadPlaylists() {