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.
This commit is contained in:
aiongg
2026-11-12 14:32:51 +00:00
parent 2b8b9172b9
commit b1f6380a7f
2 changed files with 9 additions and 2 deletions
+7 -1
View File
@@ -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| {
+2 -1
View File
@@ -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,