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

commitf0fe0c38413aa75f0bd042affeb0b2ab11c51550
parentd66d0063a6
authorLucas Galante <[email protected]>
date2026-07-04 16:28
Fix: respect widget visibility in Element::all_rounded_quads default implementation

 src/widget/mod.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/widget/mod.rs b/src/widget/mod.rs
index 16a46fd..d055da2 100644
--- a/src/widget/mod.rs
+++ b/src/widget/mod.rs
@@ -443,6 +443,9 @@ pub trait Element {
     }
 
     fn all_rounded_quads(&self, ctx: &UiContext) -> Vec<(f32, f32, f32, f32, f32, [f32; 4], (bool, bool, bool, bool))> {
+        if !self.visible() {
+            return Vec::new();
+        }
         let mut quads = Vec::new();
         let (r1, r2, r3, r4) = self.rounded_corners();
         if r1 || r2 || r3 || r4 {