git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commitb397e2ba52f6b461ad8e349b81c0cc1cba55e6a1
parentaaf368c0d9
authorLucas Galante <[email protected]>
date2026-07-29 10:39
feat: network plate wears the parameter plate's fill and bevel

The network pane's backing PassivePlate carried a hardcoded near-black fill,
so the plate bevel (shaded from the base color) was invisible and the pane
read flat next to the beveled params plate. The plate now draws from
param_plate_fill() — same tint, opacity, and blur-behind marker — scaled by
the network fade, so its bevel rolls exactly like the params plate's and
tracks Style-section retints live. The circular pane clamps the fill alpha
positive: circles carry no blur marker, so a negative alpha would render
garbage.

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

 src/app.rs    | 24 ++++++++++--------------
 src/render.rs |  6 +++++-
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/app.rs b/src/app.rs
index 095aca4..907873f 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -633,22 +633,20 @@ impl DesignSettings {
     }
 }
 
-/// Dissolved cce-ui `Plate` (Phase 6as): a passive translucent panel — configured color
-/// at `plate_opacity` times the network fade, alpha negated when blur is on (the
-/// scenefx blur marker) — with no children and no events.
+/// Dissolved cce-ui `Plate` (Phase 6as): a passive panel wearing the parameter
+/// plate's fill — same tint, opacity, and blur-behind marker (`param_plate_fill`),
+/// so the network plate's bevel rolls exactly like the params plate's and tracks a
+/// live retint/opacity/blur toggle — scaled by the network fade. No children, no
+/// events.
 pub struct PassivePlate {
-    color: [f32; 4],
-    blur: bool,
     pub network_opacity: f32,
     /// Circular hit shape while the network pane is round (the legacy Plate marker).
     curved_circle: Option<(f32, f32, f32)>,
 }
 
 impl PassivePlate {
-    pub fn new(color: [f32; 4], blur: bool) -> cce_ui::widget::Adapted<PassivePlate> {
+    pub fn new() -> cce_ui::widget::Adapted<PassivePlate> {
         cce_ui::widget::Adapted::new(Self {
-            color,
-            blur,
             network_opacity: 1.0,
             curved_circle: None,
         })
@@ -674,12 +672,10 @@ impl cce_ui::widget::Paint for PassivePlate {
     fn paint(&self, _rect: cce_ui::scene::layout::Rect, _ctx: &mut cce_ui::scene::paint::PaintCtx) {}
 
     fn color(&self) -> [f32; 4] {
-        let mut c = self.color;
-        c[3] *= cce_ui::layout::plate_opacity();
+        // `param_plate_fill` folds in the plate opacity and the blur marker; the
+        // network fade scales the (possibly negative) alpha without flipping its sign.
+        let mut c = cce_ui::colors::param_plate_fill();
         c[3] *= self.network_opacity;
-        if self.blur && cce_ui::colors::plate_blur() {
-            c[3] = -c[3].abs();
-        }
         c
     }
 
@@ -2530,7 +2526,7 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Geometry) -> (Vec<String>, Vec
                 mb.set_visible(false);
                 mb
             },
-            network_panel: PassivePlate::new([0.10, 0.10, 0.13, 0.95], false),
+            network_panel: PassivePlate::new(),
             playbar: {
                 let mut pb = Playbar::new();
                 pb.set_visible(false);
diff --git a/src/render.rs b/src/render.rs
index 14e72d5..4d44fa5 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -192,7 +192,11 @@ impl State {
             let cx = self.circular_network_layout.x;
             let cy = self.circular_network_layout.y;
             let r = self.circular_network_layout.r;
-            pc.circle(cx, cy, r, w.color());
+            // Circles carry no blur-behind marker (only Plate/Bevel prims do) — a
+            // negative alpha from the params fill would render garbage, so clamp it.
+            let mut fill = w.color();
+            fill[3] = fill[3].abs();
+            pc.circle(cx, cy, r, fill);
             pc.arc(cx, cy, r, 3.0, 0.0, TAU, [0.35, 0.65, 0.95, 0.80 * self.network_opacity]);
         } else if idx == PLAYBAR_IDX {
             // Modern-paint pane: the plate from the legacy views like the other