graphic design tool
git clone https://git.lucas.co/cce-designer.git
fix: viewport focus border follows the window's curvature-matched corners
The viewport pane's corners sit on the window's, which the renderer now
clips at the curvature-matched span (cce-ui corner_span_factor) — the
highlight at the nominal plate radius traced a visibly tighter corner
than the window cut. The interior panes keep the nominal plate radius
their own Bevel plates are drawn with.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/render.rs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/render.rs b/src/render.rs
index f36ca5b..aa37d59 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -391,7 +391,14 @@ impl State {
if w <= 0.0 || h <= 0.0 {
return;
}
- let r = cce_ui::layout::plate_corner_radius();
+ // The viewport's corners sit on the window's, so its highlight follows
+ // the window clip's curvature-matched span; the interior panes keep the
+ // nominal plate radius their own plates are drawn with.
+ let r = if self.focused_pane == RIGHT_MENUBAR_IDX {
+ colors::backplate_corner_radius() * cce_ui::layout::corner_span_factor()
+ } else {
+ cce_ui::layout::plate_corner_radius()
+ };
pc.border(rect(x, y, w, h), (r, r, r, r), [0.0; 4], color, thickness);
}