git.lucas.co / cce-layout-interface
page layout tool
git clone https://git.lucas.co/cce-layout-interface.git

commit803ede66514057835c5ab0514c7dcf34c47a8e6a
parent998876addb
authorLucas Galante <[email protected]>
date2026-08-06 14:54
feat: expose ui_context_mut for engine-driven dropdown animation

The engine ticks the exposed context each loop — this drives the
dropdown expand/contract animation frames (the grown-trigger popover
treatment from cce-ui).

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

 src/main.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 4eba246..0220b16 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2458,6 +2458,12 @@ impl Application for LayoutApp {
         Some(&self.ui_context)
     }
 
+    // The engine ticks the exposed context each loop — this is what drives the
+    // dropdown expand/contract animation frames.
+    fn ui_context_mut(&mut self) -> Option<&mut cce_ui::context::UiContext> {
+        Some(&mut self.ui_context)
+    }
+
     fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
         cce_ui::scale::set_scale_factor(1.0);
         let btn_new_doc = Button::new(0.0, 0.0, 240.0, 26.0).with_label("New Document");