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

commitc7f80f93ee769871240efd9cde052c2eb5b580fa
parenta8e18dbd55
authorLucas Galante <[email protected]>
date2026-07-24 13:02
feat: wider params scrollbar, inset further from the pane edge

The bar widens to 1.6x the DE scrollbar_width (it rides over the
section carves and read too slim at stock width) and its right-edge gap
grows from an eighth to a sixth of the plate width. One geometry pair
(scrollbar_w / scrollbar_x) feeds both drawing and hit-testing.

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

 src/widget/container/parameters_bg.rs | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/widget/container/parameters_bg.rs b/src/widget/container/parameters_bg.rs
index eb76940..bbd2c0f 100644
--- a/src/widget/container/parameters_bg.rs
+++ b/src/widget/container/parameters_bg.rs
@@ -467,18 +467,23 @@ impl ParametersBg {
         rects
     }
 
-    /// The scrollbar's left x. The bar sits an eighth of the plate's width in from the right
+    /// The pane's scrollbar width — the DE `scrollbar_width` widened: the bar
+    /// rides over the section carves and reads too slim at the stock width.
+    fn scrollbar_w(&self) -> f32 {
+        crate::layout::scrollbar_width() * 1.6
+    }
+
+    /// The scrollbar's left x. The bar sits a sixth of the plate's width in from the right
     /// edge — i.e. that gap separates the bar's right edge from the pane's right side.
     fn scrollbar_x(&self) -> f32 {
-        let sb_w = crate::layout::scrollbar_width();
-        self.rect.x + self.rect.width - sb_w - self.rect.width / 8.0
+        self.rect.x + self.rect.width - self.scrollbar_w() - self.rect.width / 6.0
     }
 
     pub fn hit_test_scrollbar(&self, px: f32, py: f32) -> bool {
         if self.content_h <= self.rect.height {
             return false;
         }
-        let sb_w = crate::layout::scrollbar_width();
+        let sb_w = self.scrollbar_w();
         let sb_x = self.scrollbar_x();
         let sb_track_h = self.rect.height - 8.0;
         let sb_track_y = self.rect.y + 4.0;
@@ -521,7 +526,7 @@ impl ParametersBg {
         if !self.scrollbar_visible() {
             return Vec::new();
         }
-        let sb_w = crate::layout::scrollbar_width();
+        let sb_w = self.scrollbar_w();
         let sb_x = self.scrollbar_x();
         let sb_track_h = self.rect.height - 8.0;
         let sb_track_y = self.rect.y + 4.0;