git.lucas.co / cce-graph
node-based graph editor
git clone https://git.lucas.co/cce-graph.git

commit24a24f898577f48c311fc81135d6cefead4cb5a6
parenta11469a7b8
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 c99ddab..0d4c1cf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1031,7 +1031,16 @@ impl Application for GraphApp {
         }
     }
 
-    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 menu dropdowns'
+        // expand/contract) 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;
+        }
+    }
 
     fn display_list(&mut self, size: LogicalSize, scale: f64) -> Option<cce_ui::scene::paint::DisplayList> {
         // Phase 6 single paint path: setup/relayout (the old view() body), then the whole