git.lucas.co / cce-fonts
font browser

commit593ad96b881f36c099eea315d1e05c7e592bc603
parent7ec363611b
authorLucas Galante <[email protected]>
date2026-08-06 12:39
fix: pump ui_context.tick — dropdown menus' close animation froze fully open

cce-ui's Dropdown (741ced0..e0bcd1e) keeps open=true through its
animated contraction and relies on the ctx tick walk to advance and
settle it. Same fix as cce-files@b69b61f; the cce-data-editor pattern.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/main.rs | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index 40b8874..bb61d28 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -798,7 +798,16 @@ impl Application for TypefaceApp {
         }
     }
 
-    fn tick(&mut self, dt: f32, _needs_rebuild: &mut bool) {
+    fn tick(&mut self, dt: f32, needs_rebuild: &mut bool) {
+        // Pump the widget tick walk: animating widgets (the style dropdown's
+        // expand/contract menu) register as tick receivers and report changed
+        // until their transition lands — without this a closing menu freezes
+        // fully open.
+        if self.ui_context.tick(dt) {
+            *needs_rebuild = true;
+            self.needs_rebuild = true;
+        }
+
         if self.click_timer > 0.0 {
             self.click_timer -= dt;
         }