From b1f6380a7f22e2f7150a400ed059e229df7146fe Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 12 Nov 2026 12:39:26 +0000 Subject: [PATCH] Layers panel: an artboard without masks is a compact heading row It reads strong and draws as rows do at thumbnail size None, so it is never taller than a layer row. An artboard with a mask keeps its thumbnail. --- crates/layers/src/ui/panel/row.rs | 8 +++++++- crates/layers/src/ui/tree.rs | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/layers/src/ui/panel/row.rs b/crates/layers/src/ui/panel/row.rs index cdfb2f8b0..04b154fe0 100644 --- a/crates/layers/src/ui/panel/row.rs +++ b/crates/layers/src/ui/panel/row.rs @@ -208,8 +208,14 @@ fn layer_row<'r, T: LayerTree>(cx: &'r PanelContext<'r, T>, id: &T::Id) -> ListR if info.dimmed { row = row.ink(RowInk::Dimmed); } + // An artboard without masks heads its layers: a strong row drawn as at thumbnail size None, never taller than a + // layer row. With a mask it keeps its thumbnail, which the mask's target and clicks go back to. + let compact = info.kind == LayerKind::Artboard && info.masks.is_empty(); + if compact { + row = row.heading(); + } - if size != ThumbSize::None { + if size != ThumbSize::None && !compact { let host = cx.thumbs; let (layer, kind) = (id.clone(), info.kind); row = row.thumb(size, move |painter, rect| { diff --git a/crates/layers/src/ui/tree.rs b/crates/layers/src/ui/tree.rs index 74a161206..1a807702d 100644 --- a/crates/layers/src/ui/tree.rs +++ b/crates/layers/src/ui/tree.rs @@ -207,7 +207,8 @@ pub enum LayerKind { Shape, /// A smart object. SmartObject, - /// An artboard (rows for artboards are step 6b's; the kind exists for apps that list them). + /// An artboard: without masks its row is a heading with no thumbnail, as every row is at + /// thumbnail size None. Artboard, /// A path (VectorCraft). Path,