mirror of
https://github.com/yattee/yattee.git
synced 2025-11-24 18:28:20 +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:
@@ -144,10 +144,15 @@ struct OpenVideosView: View {
|
||||
Spacer()
|
||||
#endif
|
||||
#if os(iOS)
|
||||
Menu {
|
||||
playbackModePicker
|
||||
} label: {
|
||||
ZStack {
|
||||
Text(playbackMode.description)
|
||||
|
||||
Menu {
|
||||
playbackModePicker
|
||||
} label: {
|
||||
Text(playbackMode.description)
|
||||
.opacity(0)
|
||||
}
|
||||
}
|
||||
#else
|
||||
playbackModePicker
|
||||
|
||||
@@ -90,18 +90,7 @@ struct PopularView: View {
|
||||
|
||||
#if os(iOS)
|
||||
private var popularMenu: some View {
|
||||
Menu {
|
||||
ListingStyleButtons(listingStyle: $popularListingStyle)
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
} label: {
|
||||
ZStack {
|
||||
HStack(spacing: 12) {
|
||||
HStack(spacing: 6) {
|
||||
Image(systemName: "chart.bar.fill")
|
||||
@@ -117,8 +106,38 @@ struct PopularView: View {
|
||||
.foregroundColor(.accentColor)
|
||||
.imageScale(.small)
|
||||
}
|
||||
.transaction { t in t.animation = nil }
|
||||
|
||||
Menu {
|
||||
ListingStyleButtons(listingStyle: $popularListingStyle)
|
||||
|
||||
Section {
|
||||
HideWatchedButtons()
|
||||
HideShortsButtons()
|
||||
}
|
||||
|
||||
Section {
|
||||
SettingsButtons()
|
||||
}
|
||||
} label: {
|
||||
HStack(spacing: 12) {
|
||||
HStack(spacing: 6) {
|
||||
Image(systemName: "chart.bar.fill")
|
||||
.foregroundColor(.primary)
|
||||
.imageScale(.small)
|
||||
|
||||
Text("Popular")
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
}
|
||||
|
||||
Image(systemName: "chevron.down.circle.fill")
|
||||
.foregroundColor(.accentColor)
|
||||
.imageScale(.small)
|
||||
}
|
||||
.opacity(0)
|
||||
}
|
||||
}
|
||||
.transaction { t in t.animation = nil }
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user