Use gold consistently for selected layers

This commit is contained in:
Dandaedre 2026-11-13 12:09:26 +01:00
parent 6ab4100527
commit 11df894b32
2 changed files with 19 additions and 7 deletions

View File

@ -341,7 +341,11 @@ impl Editor {
ink.text(0.0, 2.0, "LAYERS", 11.0, MUTED);
for i in 0..2 {
let y = 28.0 + i as f32 * 44.0;
let color = if i == 0 { AMBER } else { CYAN };
let color = if self.layout.selection_mask()[i] {
AMBER
} else {
MUTED
};
ink.card(
0.0,
y,
@ -792,7 +796,11 @@ impl Editor {
if !self.layout.visible(i) {
continue;
}
let color = if i == 0 { AMBER } else { CYAN };
let color = if self.layout.selection_mask()[i] {
AMBER
} else {
MUTED
};
let rect = Rect::from_min_size(
origin + Vec2::new(g.x as f32, g.y as f32) * scale,
Vec2::new(g.width as f32, g.height as f32) * scale,
@ -861,8 +869,8 @@ impl Editor {
screen.painter.rect(
Rect::from_two_pos(from, to),
0.0,
Color32::from_rgba_unmultiplied(102, 219, 239, 25),
Stroke::new(1.0_f32, CYAN),
Color32::from_rgba_unmultiplied(246, 197, 119, 25),
Stroke::new(1.0_f32, AMBER),
StrokeKind::Inside,
);
}
@ -891,7 +899,7 @@ impl Editor {
if bottom { 1080.0 } else { 0.0 },
) * scale;
let guide = &screen.painter;
let stroke = Stroke::new(1.0_f32, CYAN);
let stroke = Stroke::new(1.0_f32, AMBER);
guide.line_segment([edge, Pos2::new(boundary.x, edge.y)], stroke);
guide.line_segment([edge, Pos2::new(edge.x, boundary.y)], stroke);
guide.text(
@ -899,14 +907,14 @@ impl Editor {
Align2::CENTER_TOP,
format!("{dx:.2} px"),
FontId::proportional(11.0),
CYAN,
AMBER,
);
guide.text(
Pos2::new(edge.x + 6.0, (edge.y + boundary.y) / 2.0),
Align2::LEFT_CENTER,
format!("{dy:.2} px"),
FontId::proportional(11.0),
CYAN,
AMBER,
);
}
}

View File

@ -160,3 +160,7 @@ layers keep their geometry and stay in the list, but are excluded from drawing
and selection. Locking or hiding clears that layer's selection; showing it does
not unlock it. These are local session controls, separate from geometry undo/redo
(which can still restore earlier geometry), and never send device commands.
Selected layers use gold outlines, labels, handles and position guides; unselected
layers use muted outlines and labels. Gold in the layer list follows the same
selection state, including when several layers are selected.