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

commitcbaebbb13284193054e0de8fe22c695ee85338ef
parent5edd398c35
authorLucas Galante <[email protected]>
date2026-07-22 10:05
style: section carves merge title and body into one recess

The two-well look (title tab + content body) becomes a single full-width
recess from the title's top edge to the content's bottom — the title
sits inside the same well as its rows. Collapsed sections keep the
title-box carve; the flat outline style is untouched.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/widget/container/parameters_bg.rs | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/widget/container/parameters_bg.rs b/src/widget/container/parameters_bg.rs
index c2e5136..1f2ed4f 100644
--- a/src/widget/container/parameters_bg.rs
+++ b/src/widget/container/parameters_bg.rs
@@ -923,19 +923,22 @@ impl ParametersBg {
         }
         let mut out = Vec::new();
 
-        // Sections as inset panels: the title tab and the content body each
-        // carve a recess (the flat outline+fillet path is the non-relief
-        // style). The neck joining them in the outline style has no carved
-        // equivalent — the tab and body read as two wells.
+        // Sections as inset panels (the flat outline+fillet path is the
+        // non-relief style): ONE recess per section — full body width, from
+        // the title's top edge down to the content's bottom — so the title
+        // sits inside the same well as its rows instead of in a tab well of
+        // its own. Collapsed sections keep the title-box carve.
         let all = (true, true, true, true);
         let r4 = |r: f32| (r, r, r, r);
         for (title, content) in self.section_boxes() {
             let (tx, ty, tw, th) = title;
-            let depth = crate::layout::bevel_width().min(th * 0.2);
-            out.push((tx, ty, tw, th, r4(SECTION_R), depth, false, all));
             if let Some((cx, cy, cw, ch)) = content {
-                let depth = crate::layout::bevel_width().min(ch * 0.2);
-                out.push((cx, cy, cw, ch, r4(SECTION_R), depth, false, all));
+                let wh = (cy + ch) - ty;
+                let depth = crate::layout::bevel_width().min(wh * 0.2);
+                out.push((cx, ty, cw, wh, r4(SECTION_R), depth, false, all));
+            } else {
+                let depth = crate::layout::bevel_width().min(th * 0.2);
+                out.push((tx, ty, tw, th, r4(SECTION_R), depth, false, all));
             }
         }