git.lucas.co / cce-fonts
font browser

commitf254e7c7b0fae62c2ce348707187483643458a9e
parentfd46b68693
authorLucas Galante <[email protected]>
date2026-09-24 12:50
Root plate: the toolkit's standard spec, not a stroked fill

The window base was a hand-built plate: page_low brightened 1.17x, its
alpha overwritten with root_plate_opacity(), PlateSpec::radii_for for the
silhouette, and a 1.5px [0.22,0.22,0.28] stroke around it. Replace all of
that with pc.root_plate(w, h) as the frame's first prim, so the app takes
the DE root material and opacity, the shared silhouette radius, and the
standard rolled rim from cce-ui PlateSpec::window. No other layout or
colour changes.

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

 src/main.rs | 24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 869bc7e..fe3e7e9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -859,28 +859,12 @@ impl Application for TypefaceApp {
         let base_low = cce_ui::colors::page_low_color();
         let border_col = cce_ui::colors::color_borders_color();
 
-        // 1. General window background
-        let bg_color = [
-            (base_low[0] * 1.17).min(1.0),
-            (base_low[1] * 1.17).min(1.0),
-            (base_low[2] * 1.17).min(1.0),
-            base_low[3],
-        ];
-        // 2. The dissolved root plate container's plate (bg at root plate opacity, config border
-        // and radius), then the dissolved panels' plates and their children walked in the
-        // legacy panel order.
+        // 1. The window base, then the dissolved panels' plates and their children
+        // walked in the legacy panel order.
         use cce_ui::scene::layout::Rect;
         let mut pc = cce_ui::scene::paint::PaintCtx::new();
-        {
-            let mut fill = bg_color;
-            if fill[3] > 0.001 {
-                fill[3] = cce_ui::color::root_plate_opacity();
-            }
-            // Silhouette radii (cce-ui RFC 7b): matches the compositor clip.
-            let radii = cce_ui::scene::paint::PlateSpec::radii_for((true, true, true, true));
-            let rect = Rect { x: 0.0, y: 0.0, width: w_f32, height: h_f32 };
-            pc.border(rect, radii, fill, [0.22, 0.22, 0.28, 1.0], 1.5);
-        }
+        // The standard root plate (cce-ui PlateSpec::window).
+        pc.root_plate(w_f32, h_f32);
         {
             let self_ptr = self as *mut Self;
             // Left panel plate + children.