GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
style: recess the TreeList like a text box well
Under control_relief the tree carves a recess over its full rect after
the bg/row quads (depth = bevel_width capped at h/5), so the tree floor
reads as sunken below the pane surface — matching the recessed list and
section wells in cce-files.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/widget/container/treelist.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/widget/container/treelist.rs b/src/widget/container/treelist.rs
index 2549762..9cd33d6 100644
--- a/src/widget/container/treelist.rs
+++ b/src/widget/container/treelist.rs
@@ -919,6 +919,13 @@ impl Paint for TreeList {
}
}
+ // Recessed well like a text box or list: the tree floor sits below the
+ // pane surface, its wall carved over the bg and row quads above.
+ if crate::layout::control_relief() {
+ let depth = crate::layout::bevel_width().min(h * 0.2);
+ pc.recess(Rect { x, y, width: w, height: h }, (radius, radius, radius, radius), depth);
+ }
+
// Row/header labels with the legacy header/list viewport bounds.
let font = Some(crate::layout::tree_font());
let (x, y, w, _h) = (rect.x, rect.y, rect.width, rect.height);