GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
Implement rounded_corners for Spinbox widget to enable rounded corners on outer buttons
src/widget/input/spinbox.rs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/widget/input/spinbox.rs b/src/widget/input/spinbox.rs
index 373110c..a1567a0 100644
--- a/src/widget/input/spinbox.rs
+++ b/src/widget/input/spinbox.rs
@@ -112,6 +112,15 @@ impl Element for Spinbox {
Some(crate::layout::spinbox_height())
}
+ fn rounded_corners(&self) -> (bool, bool, bool, bool) {
+ let r = crate::layout::spinbox_corner_radius();
+ if r > 0.0 {
+ (true, true, true, true)
+ } else {
+ (false, false, false, false)
+ }
+ }
+
fn corner_radius(&self) -> f32 {
crate::layout::spinbox_corner_radius()
}