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

commit8bc46eb63b5d4bbed4f2a7ab87d990e04db20a09
parent9f8d435ea9
authorLucas Galante <[email protected]>
date2026-09-21 13:31
ParametersBg: the scrollbar rides the pane's centre line

The pane's bar sat a sixth of the width in from the right edge. Every
other sink-behind bar in the DE rides its plate's centre line — cce-mail's
list and body, the designer's dialog list — and beside one of those (the
dialog's Commands half, one tab over from the Settings half this pane
draws) the offset read as off-centre. Centred now: over the rows,
reserving no lane, in front only while raised. Reaches every parameters
pane: the designer's node parameters and dialog settings, cce-files'
preferences.

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

 src/widget/container/parameters_bg.rs | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/widget/container/parameters_bg.rs b/src/widget/container/parameters_bg.rs
index d4cef07..e592628 100644
--- a/src/widget/container/parameters_bg.rs
+++ b/src/widget/container/parameters_bg.rs
@@ -615,10 +615,13 @@ impl ParametersBg {
         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.
+    /// The scrollbar's left x: the bar rides the pane's CENTRE line, as
+    /// every sink-behind bar in the DE does (cce-mail's list and body, the
+    /// designer's dialog list) — over the rows, reserving no lane, in front
+    /// only while raised. It sat a sixth of the width in from the right
+    /// edge before 2026-09-21, which beside a centred bar read as off.
     fn scrollbar_x(&self) -> f32 {
-        self.rect.x + self.rect.width - self.scrollbar_w() - self.rect.width / 6.0
+        self.rect.x + (self.rect.width - self.scrollbar_w()) * 0.5
     }
 
     pub fn hit_test_scrollbar(&self, px: f32, py: f32) -> bool {