fix: 1-to-1 official equalizer, settings, animations, and click-outside dismissal

This commit is contained in:
marwy 2026-11-27 19:54:12 +03:00
parent b7cfde1f6b
commit b315b212a4
9 changed files with 928 additions and 557 deletions

View file

@ -539,8 +539,38 @@ impl YandexMusicShell {
}
// 6. Floating Popovers & Context Menus (ZLayer::Popover)
if self.app.eq_popover_open {
render_eq_popover(&mut self.ui, &pal, &self.app, &mut self.shell, &mut actions);
let ease_out = |t: f32| -> f32 {
let u = 1.0 - t.clamp(0.0, 1.0);
1.0 - u * u * u
};
let eq_pop_t = if self.app.fixed_vibe_time.is_some() {
if self.app.eq_popover_open { 1.0 } else { 0.0 }
} else {
ease_out(self.ui.animate_bool(
WidgetId::new("ym_quality_popover_anim"),
self.app.eq_popover_open,
0.18,
))
};
let eq_expand_t = if self.app.fixed_vibe_time.is_some() {
if self.app.config.eq_enabled { 1.0 } else { 0.0 }
} else {
ease_out(self.ui.animate_bool(
WidgetId::new("ym_quality_eq_expand"),
self.app.config.eq_enabled,
0.20,
))
};
if eq_pop_t > 0.01 {
render_eq_popover(
&mut self.ui,
&pal,
&self.app,
&mut self.shell,
eq_pop_t,
eq_expand_t,
&mut actions,
);
}
render_track_context_menu(&mut self.ui, &pal, &self.app, &mut self.shell, &mut actions);
render_entity_context_menu(&mut self.ui, &pal, &self.app, &mut self.shell, &mut actions);
@ -563,14 +593,48 @@ impl YandexMusicShell {
if self.app.track_detail_modal.is_some() {
render_track_detail_modal(&mut self.ui, &pal, &mut self.covers, &self.app, &mut actions);
}
if self.app.release_notes_modal_open {
render_release_notes_modal(&mut self.ui, &pal, &self.app, &mut actions);
let rn_mod_t = if self.app.fixed_vibe_time.is_some() {
if self.app.release_notes_modal_open { 1.0 } else { 0.0 }
} else {
ease_out(self.ui.animate_bool(
WidgetId::new("ym_release_notes_modal_anim"),
self.app.release_notes_modal_open,
0.18,
))
};
if rn_mod_t > 0.01 {
render_release_notes_modal(&mut self.ui, &pal, &self.app, rn_mod_t, &mut actions);
}
if self.app.equalizer_modal_open {
render_equalizer_modal(&mut self.ui, &pal, &self.app, &mut self.shell, &mut actions);
let eq_mod_t = if self.app.fixed_vibe_time.is_some() {
if self.app.equalizer_modal_open { 1.0 } else { 0.0 }
} else {
ease_out(self.ui.animate_bool(
WidgetId::new("ym_eq_modal_anim"),
self.app.equalizer_modal_open,
0.18,
))
};
if eq_mod_t > 0.01 {
render_equalizer_modal(
&mut self.ui,
&pal,
&self.app,
&mut self.shell,
eq_mod_t,
&mut actions,
);
}
if self.app.shortcuts_modal_open {
render_shortcuts_modal(&mut self.ui, &pal, &self.app, &mut actions);
let sc_mod_t = if self.app.fixed_vibe_time.is_some() {
if self.app.shortcuts_modal_open { 1.0 } else { 0.0 }
} else {
ease_out(self.ui.animate_bool(
WidgetId::new("ym_shortcuts_modal_anim"),
self.app.shortcuts_modal_open,
0.18,
))
};
if sc_mod_t > 0.01 {
render_shortcuts_modal(&mut self.ui, &pal, &self.app, sc_mod_t, &mut actions);
}
// 8. Transparent 32px Floating TitleBar (ZLayer::Titlebar)