GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
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 {