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

commit70ea04423df35392a5a2592e2b2e4396247b7a1c
parent4797dcfbb1
authorLucas Galante <[email protected]>
date2026-06-28 08:52
Implement range() on Spinbox and override layout_ignore to return true

 src/widget/input/spinbox.rs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/widget/input/spinbox.rs b/src/widget/input/spinbox.rs
index 3d4c9a5..8d783ac 100644
--- a/src/widget/input/spinbox.rs
+++ b/src/widget/input/spinbox.rs
@@ -69,6 +69,10 @@ impl Spinbox {
         self.decimals = decimals;
         self
     }
+
+    pub fn range(&self) -> (i32, i32) {
+        (self.min, self.max)
+    }
 }
 
 impl Element for Spinbox {
@@ -406,6 +410,10 @@ impl Element for Spinbox {
         });
         labels
     }
+
+    fn layout_ignore(&self) -> bool {
+        true
+    }
 }
 
 impl Drop for Spinbox {