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

commit013036af205734c78273b734f5b6c61bce46ee12
parent0e28ae44cc
authorLucas Galante <[email protected]>
date2026-07-17 10:01
feat: params pane draws the toggle rows' border corner arcs

cce-ui's ParametersBg now serves bool rows as Toggles; draw their
rounded-mode corner arcs from the new arcs() view inside the pane's
scroll clip, and drop the unused Checkbox import.

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

 src/app.rs    | 2 +-
 src/render.rs | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/app.rs b/src/app.rs
index 422cd13..548fb2e 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -34,7 +34,7 @@ use wayland_client::{
     Connection, QueueHandle, Proxy,
 };
 
-use cce_ui::widget::{Adapted, Breadcrumb, MenuBar, MenuController, ParametersBg, Splitter, Spreadsheet, StatusBar, TextLabel, WidgetHost, GraphNode, Graph, Button, Checkbox, Label, Dropdown};
+use cce_ui::widget::{Adapted, Breadcrumb, MenuBar, MenuController, ParametersBg, Splitter, Spreadsheet, StatusBar, TextLabel, WidgetHost, GraphNode, Graph, Button, Label, Dropdown};
 use cce_ui::widget::UiContext;
 use crate::viewport_3d::Viewport3D;
 use cce_ui::colors;
diff --git a/src/render.rs b/src/render.rs
index 99b74af..650da22 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -245,8 +245,9 @@ impl State {
 
             // The params pane serves its chrome through the legacy plain-quad view,
             // which carries flat quads only — the controls' rounded-rect backgrounds
-            // (textbox/dropdown/button/checkbox/color) come from the rounded view,
-            // drawn under the flat chrome and clipped to the pane's scroll viewport.
+            // (textbox/dropdown/button/toggle/color) and the toggles' border corner
+            // arcs come from the rounded/arc views, drawn under the flat chrome and
+            // clipped to the pane's scroll viewport.
             if idx == PARAM_IDX {
                 let (px, py, pw, ph) = self.positions[PARAM_IDX];
                 let view = rect(px, py + 4.0, pw, (ph - 8.0).max(0.0));
@@ -260,6 +261,9 @@ impl State {
                     for (qx, qy, qw, qh, qr, qc, corners) in param_bg.rounded_quads(&self.ui_context) {
                         pc.rounded_rect(rect(qx, qy, qw, qh), qr, corners, qc);
                     }
+                    for (acx, acy, ar, at, a0, a1, ac) in param_bg.arcs() {
+                        pc.arc(acx, acy, ar, at, a0, a1, ac);
+                    }
                 });
             }