git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit43c5e0facdeadb600d390b36fc229da6962bb864
parentb415163aba
authorLucas Galante <[email protected]>
date2026-07-03 01:01
Delegated drag lifecycle events (draggable, drag_begin, drag_update, drag_end) from TreeList to ScrollBox

 src/widget/container/treelist.rs | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/widget/container/treelist.rs b/src/widget/container/treelist.rs
index 72e4c6c..3289a9d 100644
--- a/src/widget/container/treelist.rs
+++ b/src/widget/container/treelist.rs
@@ -464,6 +464,22 @@ impl Element for TreeList {
         changed
     }
 
+    fn draggable(&self) -> bool {
+        self.scroll_box.draggable()
+    }
+
+    fn drag_begin(&mut self, px: f32, py: f32) {
+        self.scroll_box.drag_begin(px, py);
+    }
+
+    fn drag_update(&mut self, px: f32, py: f32) -> bool {
+        self.scroll_box.drag_update(px, py)
+    }
+
+    fn drag_end(&mut self) {
+        self.scroll_box.drag_end();
+    }
+
     fn wants_tick(&self) -> bool {
         true
     }