GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
treelist: drop the hardcoded header background fill
The Key/Type/Value header drew an opaque hardcoded dark quad
([0.12, 0.12, 0.16]) behind its labels — the one fill in the tree that
no config key reached, left standing after background_color and the row
bg colors went transparent. The header now sits directly on the pane
surface like the rows; its below-line and column separators stay.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/widget/container/treelist.rs | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/widget/container/treelist.rs b/src/widget/container/treelist.rs
index f6cb0b0..cf67c20 100644
--- a/src/widget/container/treelist.rs
+++ b/src/widget/container/treelist.rs
@@ -774,17 +774,14 @@ impl Paint for TreeList {
let search_h = 26.0;
let offset_y = search_h + 2.0 * search_margin_y;
- // Draw Header background and border
+ // Draw Header border (no background fill — the header sits directly on
+ // the pane surface, like the rows).
let header_h = 26.0;
- let header_bg_color = [0.12, 0.12, 0.16, 1.0]; // Dark header color
let header_border_color = [0.18, 0.18, 0.22, 1.0];
-
+
let list_left = self.scroll_box.base.x;
let list_width = self.scroll_box.base.w;
-
- // Header background (not rounded anymore, since it is in the middle of TreeList, below search box)
- quads.push((list_left + 1.0, y + offset_y + 1.0, list_width - 2.0, header_h - 1.0, 0.0, apply_opacity(header_bg_color), (false, false, false, false)));
-
+
// Separator line below header
quads.push((list_left + 1.0, y + offset_y + header_h - 1.0, list_width - 2.0, 1.0, 0.0, apply_opacity(header_border_color), (false, false, false, false)));