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

commitd8ab3e4e666c109ccaff4f52b7cc78e7b9b73ae7
parent67c35eb381
authorLucas Galante <[email protected]>
date2026-06-16 13:06
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()
     }