fix: hide bottom player bar companion when fullscreen player is open

This commit is contained in:
marwy 2026-11-27 23:41:27 +03:00
parent 6a20172ee4
commit 8d25d641a4
2 changed files with 14 additions and 1 deletions

View file

@ -140,7 +140,8 @@ pub fn render_player_bar(
scrub_resp.hovered || scrub_resp.pressed || scrub_resp.dragged || shell.pb_scrub_frac.is_some();
let hover_t = ctx.animate_bool(WidgetId::new("pb_scrub_hover_anim"), bar_hovered || scrub_active, 0.15);
if is_custom_thumb || hover_t > 0.01 {
// Never draw PlayerBar's `ZLayer::Popover` progress bar/companion on top of FullscreenPlayer (`ZLayer::Drawer`)!
if !app.fullscreen_open && (is_custom_thumb || hover_t > 0.01) {
let display_frac = display_progress;
ctx.with_layer(ZLayer::Popover, |ctx| {

View file

@ -2591,5 +2591,17 @@ fn test_ext_19_official_settings_sound_quality_equalizer_and_shortcuts_modals()
let img_th = render_single_frame(&mut vk, &mut shell, 0.064);
assert!(img_th.width() == NATIVE_W && img_th.height() == NATIVE_H);
}
// Regression: Fullscreen player must NOT leak the bottom PlayerBar companion on top of it!
shell.app.config.player_thumb = yandex_music_rs::config::PlayerThumbStyle::Claudik;
shell.app.fullscreen_open = true;
let img_fs_claudik = render_single_frame(&mut vk, &mut shell, 0.080);
shell.app.config.player_thumb = yandex_music_rs::config::PlayerThumbStyle::Standard;
let img_fs_std = render_single_frame(&mut vk, &mut shell, 0.080);
assert_eq!(
img_fs_claudik.as_raw(),
img_fs_std.as_raw(),
"Fullscreen player leaked bottom PlayerBar companion onto ZLayer::Popover!"
);
}
}