Give the tvOS New Playlist row air between icon and title

A tvOS Label sets its plus glyph nearly against the text at this size;
the row spells the gap out with an HStack there, shared by the local and
remote sections. Other platforms keep the plain Label.
This commit is contained in:
Arkadiusz Fal
2026-09-15 23:23:47 +02:00
parent ba553162f4
commit e28ca98831

View File

@@ -239,15 +239,28 @@ struct PlaylistSelectorSheet: View {
// MARK: - Sections
/// The "New Playlist" row's label. tvOS lays a `Label`'s icon nearly
/// against its title at this size, so the gap is spelled out there.
private var newPlaylistLabel: some View {
#if os(tvOS)
HStack(spacing: 20) {
Image(systemName: "plus.circle")
Text(String(localized: "playlist.new"))
}
#else
Label(
String(localized: "playlist.new"),
systemImage: "plus.circle"
)
#endif
}
private var localSection: some View {
Section {
Button {
showingNewPlaylist = true
} label: {
Label(
String(localized: "playlist.new"),
systemImage: "plus.circle"
)
newPlaylistLabel
}
if playlists.isEmpty {
@@ -274,10 +287,7 @@ struct PlaylistSelectorSheet: View {
Button {
newRemotePlaylistAccount = account
} label: {
Label(
String(localized: "playlist.new"),
systemImage: "plus.circle"
)
newPlaylistLabel
}
if let remotePlaylists = appEnvironment?.remotePlaylistsCache.playlists(for: account.id) {