git.lucas.co / cce-gallery
widget gallery and compositor test bench

commitfabfbcfd893d75c039eab6904e0fa42edeb43a57
parent0f87814753
authorLucas Galante <[email protected]>
date2026-09-09 10:13
style: the page scrollbar in relief; room for the StatusDot labels

The exhibit area's scrollbar was the ScrollBox's flat quads beside a
TreeList whose scrollbar is a groove and a raised thumb; it now paints the
toolkit's relief scrollbar under control_relief, the quads otherwise. The
StatusDot exhibits widen from 150 to 200: their detached labels are now in
the configured label font (cce-ui@7b17250), which is wider than the sans
they fell back to, and three of them ran into each other.

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

 src/main.rs | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index f79486c..03ec2f8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -750,7 +750,7 @@ fn variant_exhibits() -> Vec<Exhibit> {
     let csh = cce_ui::layout::color_selector_height();
     let pbh = cce_ui::layout::progressbar_height();
     // A StatusDot is 12px square; its exhibit is as wide as its label.
-    const DOT_W: f32 = 150.0;
+    const DOT_W: f32 = 200.0;
     // A column of three rotated tabs, and the sidebar width a vertical strip is drawn for.
     const TABS_H: f32 = 120.0;
     const TAB_COLUMN_W: f32 = 40.0;
@@ -884,7 +884,7 @@ impl State {
             .width;
         // A StatusDot is 12px square; its exhibit is as wide as its label
         // (`content_width` hands the dot its own size back after layout).
-        const DOT_W: f32 = 150.0;
+        const DOT_W: f32 = 200.0;
         let raw: [(usize, f32, f32); 29] = [
             (2, W, bh),                                   // Button
             (19, W, bh),                                  // ButtonStrip
@@ -1417,10 +1417,16 @@ impl cce_ui::engine::Application for State {
                 }
             }
         }
-        // The exhibit area's scrollbar, over the exhibits.
+        // The exhibit area's scrollbar, over the exhibits: the toolkit's relief
+        // scrollbar (a groove track, a raised thumb — the TreeList's), the flat
+        // quads only when relief is off.
         if !self.is_child {
-            for (sx, sy, sw, sh, sc) in self.exhibit_scroll.extra_quads() {
-                pc.quad(Rect { x: sx, y: sy, width: sw, height: sh }, sc);
+            if cce_ui::layout::control_relief() {
+                self.exhibit_scroll.paint_scrollbar_relief(&mut pc);
+            } else {
+                for (sx, sy, sw, sh, sc) in self.exhibit_scroll.extra_quads() {
+                    pc.quad(Rect { x: sx, y: sy, width: sw, height: sh }, sc);
+                }
             }
         }