graphic design tool
git clone https://git.lucas.co/cce-designer.git
feat: uniform network background; drop-target cell glows during drags
Cells and the gaps between them read as ONE surface: the dormant
uniform_background flag is on by default (the graph's bg_color carries
the cell tint and blur marker; no cell/gap quads, no grout). The only
cell highlight left is the drop target: while a node drag is in flight,
the cell it will land on (drop_target_cell_rect, cce-ui@…) wears a
faint light-pink halo — three layered expansions drawn under the node
bodies, so with grid snap the glow rings the dragged body.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/app.rs | 5 ++++-
src/render.rs | 15 +++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/app.rs b/src/app.rs
index 5f71c6e..d5b1268 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -3293,7 +3293,10 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Geometry) -> (Vec<String>, Vec
last_autosave_time: std::time::Instant::now(),
active_menu_cloud_pid: None,
active_menu_cloud_idx: None,
- uniform_background: false,
+ // Cells and gaps render as ONE surface (the graph's bg_color is
+ // the cell tint): the checkerboard grout is off by design; the
+ // drop-target glow (render.rs) carries the only cell highlight.
+ uniform_background: true,
network_opacity: 0.95,
node_opacity: 1.0,
last_design_mod_time: {
diff --git a/src/render.rs b/src/render.rs
index a14a2f0..75492b0 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -372,6 +372,21 @@ impl State {
pc.quad(rect(qx, qy, qw, qh), qc);
}
}
+ // Drop-target glow: while a node drag is in flight, the cell
+ // it will land on wears a faint light-pink halo — layered
+ // expansions under the node bodies, so with grid snap on
+ // (node covering the cell exactly) the glow reads as a ring
+ // emanating around the dragged body.
+ if let Some((gx, gy, gw, gh)) = self.graph().drop_target_cell_rect() {
+ for (grow, alpha) in [(10.0f32, 0.05f32), (5.0, 0.08), (0.0, 0.11)] {
+ pc.rounded_rect(
+ rect(gx - grow, gy - grow, gw + 2.0 * grow, gh + 2.0 * grow),
+ cell_r + grow,
+ (true, true, true, true),
+ [1.0, 0.72, 0.80, alpha],
+ );
+ }
+ }
for (qx, qy, qw, qh, highlighted) in bodies {
if highlighted {
pc.bevel_tinted(rect(qx, qy, qw, qh), radii, node_fill, node_bevel, hl_tint);