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

commit39e2ba133d5b084bdba9ce7fa3bddb6c88a9eff7
parentbbad6ae952
authorLucas Galante <[email protected]>
date2026-07-03 01:24
Skipped flat background quads for Backplate and Plate when rounded corners are active

 src/widget/container/backplate.rs | 4 ++--
 src/widget/container/plate.rs     | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/widget/container/backplate.rs b/src/widget/container/backplate.rs
index 0d26a25..91de46b 100644
--- a/src/widget/container/backplate.rs
+++ b/src/widget/container/backplate.rs
@@ -170,8 +170,8 @@ impl Element for Backplate {
         let mut quads = Vec::new();
         let bg_color = self.color();
         let (wx, wy, ww, wh) = self.rect();
-        
-        if bg_color[3] != 0.0 {
+        let has_rounded = self.rounded_corners() != (false, false, false, false);
+        if bg_color[3] != 0.0 && !has_rounded {
             quads.push((wx, wy, ww, wh, bg_color));
         }
         for &child_ptr in &self.children {
diff --git a/src/widget/container/plate.rs b/src/widget/container/plate.rs
index cbefdf6..cca5a7c 100644
--- a/src/widget/container/plate.rs
+++ b/src/widget/container/plate.rs
@@ -365,7 +365,10 @@ impl Element for Plate {
         }
         let mut quads = Vec::new();
         let (px, py, pw, ph) = self.rect();
-        quads.push((px, py, pw, ph, self.color()));
+        let has_rounded = self.rounded_corners() != (false, false, false, false);
+        if !has_rounded {
+            quads.push((px, py, pw, ph, self.color()));
+        }
 
         for &child_ptr in &self.base.children {
             let widget = unsafe { &*child_ptr };