mirror of
https://github.com/yattee/yattee.git
synced 2025-11-25 18:58:21 +00:00
Fix iOS menu text disappearing in navigation headers
Extended the ZStack overlay fix to all iOS navigation header menus where text labels would disappear when tapping the menu: - HomeView: "Home" title menu - PopularView: "Popular" title with icon menu - TrendingView: Country/flag title menu - PlaylistsView: Playlist title with thumbnail menu - ChannelPlaylistView: Playlist title with thumbnail menu - OpenVideosView: Playback mode picker menu All menus now use the same pattern as PlaybackSettings: - Visible static label layer in ZStack - Invisible Menu overlay with .opacity(0) - Prevents text disappearing and resizing animations
This commit is contained in:
@@ -109,22 +109,7 @@ struct ChannelPlaylistView: View {
|
||||
|
||||
#if os(iOS)
|
||||
private var playlistMenu: some View {
|
||||
Menu {
|
||||
playButtons
|
||||
|
||||
favoriteButton
|
||||
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
} label: {
|
||||
ZStack {
|
||||
HStack(spacing: 12) {
|
||||
if let url = store.item?.thumbnailURL ?? playlist.thumbnailURL {
|
||||
ThumbnailView(url: url)
|
||||
@@ -141,8 +126,43 @@ struct ChannelPlaylistView: View {
|
||||
.imageScale(.small)
|
||||
}
|
||||
.frame(maxWidth: 320)
|
||||
.transaction { t in t.animation = nil }
|
||||
|
||||
Menu {
|
||||
playButtons
|
||||
|
||||
favoriteButton
|
||||
|
||||
ListingStyleButtons(listingStyle: $channelPlaylistListingStyle)
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
} label: {
|
||||
HStack(spacing: 12) {
|
||||
if let url = store.item?.thumbnailURL ?? playlist.thumbnailURL {
|
||||
ThumbnailView(url: url)
|
||||
.frame(width: 60, height: 30)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 2))
|
||||
}
|
||||
|
||||
Text(playlist.title)
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
|
||||
Image(systemName: "chevron.down.circle.fill")
|
||||
.foregroundColor(.accentColor)
|
||||
.imageScale(.small)
|
||||
}
|
||||
.frame(maxWidth: 320)
|
||||
.opacity(0)
|
||||
}
|
||||
}
|
||||
.transaction { t in t.animation = nil }
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user