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

commit24a9eaf6fa31beef9922965caa5e66ba9efd1771
parenta87ddc8b6a
authorLucas Galante <[email protected]>
date2026-08-27 12:20
feat: the network cursor is the focus glint

The 2px flat border ring becomes the DE focus language: a standalone
accent-tinted boss ring, which the tinted carve path renders as the
wrapped specular line — the exact highlight selected plates wear, at the
plates' bevel width so inset and band match.

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

 src/render.rs | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/render.rs b/src/render.rs
index 7b04e6a..144e4ae 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -412,17 +412,21 @@ impl State {
                 let cy = py + self.grid_cursor_row as f32 * (self.grid_size_y + self.gap_row_h) + self.pan_y;
                 let cw = self.grid_size_x;
                 let ch = self.grid_size_y;
-                let thickness = 2.0;
-                let mut color = colors::highlight_primary_color();
-                color[3] = 0.9;
+                // The cursor is the focus language: the same wrapped,
+                // accent-tinted glint the selected plates wear, as a
+                // standalone boss ring (the tinted free-carve path renders
+                // the specular line alone). Depth = the plates' bevel width,
+                // so the band's inset and width match theirs exactly.
+                let color = colors::highlight_primary_color();
+                let tint = [color[0], color[1], color[2]];
+                let depth = cce_ui::colors::plate_bevel_width();
                 if self.graph().is_node_rect(cx, cy, cw, ch) {
                     let r = cce_ui::layout::graph_node_corner_radius();
-                    pc.border(rect(cx, cy, cw, ch), (r, r, r, r), [0.0; 4], color, thickness);
+                    pc.boss_edges_tinted(rect(cx, cy, cw, ch), (r, r, r, r), depth, (true, true, true, true), tint);
                 } else {
-                    // The empty-cell cursor follows the cells' superellipse arcs.
                     let r = self.graph().cell_corner_radius();
                     pc.clip(clip, |pc| {
-                        pc.border(rect(cx, cy, cw, ch), (r, r, r, r), [0.0; 4], color, thickness);
+                        pc.boss_edges_tinted(rect(cx, cy, cw, ch), (r, r, r, r), depth, (true, true, true, true), tint);
                     });
                 }
             }