From a1202eaf2af9c240bb7e115b17607df86f5fc774 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 9 Feb 2026 17:16:36 -0800 Subject: [PATCH] ui: delay nav bar animation (#37137) * from da bounce * try this * you can get it to clean up wow --- system/ui/widgets/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/ui/widgets/__init__.py b/system/ui/widgets/__init__.py index 5d474e8ae..b3b1276a5 100644 --- a/system/ui/widgets/__init__.py +++ b/system/ui/widgets/__init__.py @@ -242,6 +242,7 @@ class NavWidget(Widget, abc.ABC): self._pos_filter = BounceFilter(0.0, 0.1, 1 / gui_app.target_fps, bounce=1) self._playing_dismiss_animation = False self._trigger_animate_in = False + self._nav_bar_show_time = 0.0 self._back_enabled: bool | Callable[[], bool] = True self._nav_bar = NavBar() @@ -330,6 +331,7 @@ class NavWidget(Widget, abc.ABC): if self._trigger_animate_in: self._pos_filter.x = self._rect.height self._nav_bar_y_filter.x = -NAV_BAR_MARGIN - NAV_BAR_HEIGHT + self._nav_bar_show_time = rl.get_time() self._trigger_animate_in = False new_y = 0.0 @@ -366,8 +368,14 @@ class NavWidget(Widget, abc.ABC): if self.back_enabled: bar_x = self._rect.x + (self._rect.width - self._nav_bar.rect.width) / 2 + nav_bar_delayed = rl.get_time() - self._nav_bar_show_time < 0.4 + # User dragging or dismissing, nav bar follows NavWidget if self._back_button_start_pos is not None or self._playing_dismiss_animation: self._nav_bar_y_filter.x = NAV_BAR_MARGIN + self._pos_filter.x + # Waiting to show + elif nav_bar_delayed: + self._nav_bar_y_filter.x = -NAV_BAR_MARGIN - NAV_BAR_HEIGHT + # Animate back to top else: self._nav_bar_y_filter.update(NAV_BAR_MARGIN)