graphic design tool
git clone https://git.lucas.co/cce-designer.git
feat: params scrollbar track and thumb are squircle pills
The scrollbar's flat quads become rounded rects at half-width radius,
so the caps follow the DE corner family (squircle at corner_shape > 2)
like the nodes and section corners.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/render.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/render.rs b/src/render.rs
index 17c3080..90397c5 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -251,9 +251,11 @@ impl State {
};
// Idle: draw the scrollbar first so the translucent pane plate settles over it.
+ // Track and thumb are pills — half-width radius on the DE corner
+ // family (squircle when corner_shape > 2), like the nodes.
if let Some((quads, false)) = ¶m_scrollbar {
for &(qx, qy, qw, qh, qc) in quads {
- pc.quad(rect(qx, qy, qw, qh), qc);
+ pc.rounded_rect(rect(qx, qy, qw, qh), qw.min(qh) * 0.5, (true, true, true, true), qc);
}
}
@@ -315,7 +317,7 @@ impl State {
// Active: draw the scrollbar last so it rides above the pane content and plate.
if let Some((quads, true)) = ¶m_scrollbar {
for &(qx, qy, qw, qh, qc) in quads {
- pc.quad(rect(qx, qy, qw, qh), qc);
+ pc.rounded_rect(rect(qx, qy, qw, qh), qw.min(qh) * 0.5, (true, true, true, true), qc);
}
}
}