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

commitf4ca76a7f7764ecab9da48d6e23f41a6b70b455f
parenta13619ad25
authorLucas Galante <[email protected]>
date2026-07-03 00:52
Extended tree row backgrounds and separator lines symmetrically to the right edge of the list container

 src/widget/container/treelist.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/widget/container/treelist.rs b/src/widget/container/treelist.rs
index 74c7a12..02e71b2 100644
--- a/src/widget/container/treelist.rs
+++ b/src/widget/container/treelist.rs
@@ -549,7 +549,7 @@ impl Element for TreeList {
                 }
             };
             
-            quads.push((list_left + 1.0, draw_y, list_width - 9.0, draw_h, bg_color));
+            quads.push((list_left + 1.0, draw_y, list_width - 2.0, draw_h, bg_color));
             
             // Draw column separator lines and color preview for Leaf rows
             if let TreeElement::Leaf { ref val, original_idx, .. } = item {
@@ -577,7 +577,7 @@ impl Element for TreeList {
             }
 
             if row_y + self.item_height <= list_bottom {
-                quads.push((list_left + 1.0, row_y + self.item_height - 1.0, list_width - 9.0, 1.0, [0.13, 0.13, 0.17, 1.0]));
+                quads.push((list_left + 1.0, row_y + self.item_height - 1.0, list_width - 2.0, 1.0, [0.13, 0.13, 0.17, 1.0]));
             }
         }
 
@@ -926,7 +926,7 @@ impl Element for TreeList {
                 }
             };
             
-            quads.push((list_left + 1.0, draw_y, list_width - 9.0, draw_h, 0.0, apply_opacity(bg_color), (false, false, false, false)));
+            quads.push((list_left + 1.0, draw_y, list_width - 2.0, draw_h, 0.0, apply_opacity(bg_color), (false, false, false, false)));
             
             if let TreeElement::Leaf { ref val, original_idx, .. } = item {
                 let separator_color = crate::color::tree_separator_color();
@@ -952,7 +952,7 @@ impl Element for TreeList {
             }
 
             if row_y + self.item_height <= list_bottom {
-                quads.push((list_left + 1.0, row_y + self.item_height - 1.0, list_width - 9.0, 1.0, 0.0, apply_opacity([0.13, 0.13, 0.17, 1.0]), (false, false, false, false)));
+                quads.push((list_left + 1.0, row_y + self.item_height - 1.0, list_width - 2.0, 1.0, 0.0, apply_opacity([0.13, 0.13, 0.17, 1.0]), (false, false, false, false)));
             }
         }