Canvas · Panels: layers, inspector, alignment, assets, style and layout editors

LayerPanel lists the canvas's layers topmost first on lists::Tree: a box
shows or hides each, F2 renames, a drag restacks into a new paint order.
InspectorPanel edits the one selected shape's frame, fill, visibility and
lock. AlignmentToolbar lines up or spreads the selection through
`aligned`. AssetPanel finds shapes by name in a picks grid, each drawn
to fit its tile. ColorPanel, ShadowEditor, BorderEditor and
TypographyPanel edit a look; GradientPanel is forms::GradientEditor.
ConstraintsEditor pins a shape to its frame, with `Constraints::placed`;
AutoLayoutControls sets flow, gap, padding and a place grid, with
`AutoLayout::laid`; ExportPanel names each file once. The panels share
`canvas::panel`: editing, pair, caption, heading and color_well.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-27 07:58:27 -04:00
1 parent c637347a2a
commit 07b875b0d3
32 files changed
+3118 -18

No files matched your search

+15
View File
@@ -26,6 +26,15 @@ pub struct CanvasSizes {
pub map: (Rems, Rems),
/// A handle, square.
pub handle: Rems,
/// An asset's tile, square, and the room around its drawing.
pub asset: Rems,
pub asset_inset: Rems,
/// The constraints picture, square.
pub pins: Rems,
/// A place in the auto layout grid, square; the chosen one's mark and the rest's pips.
pub place: Rems,
pub place_mark: Rems,
pub place_pip: Rems,
}
impl Theme {
@@ -42,6 +51,12 @@ impl Theme {
note_corner: px_to_rems(4.0),
map: (px_to_rems(200.0), px_to_rems(140.0)),
handle: px_to_rems(8.0),
asset: px_to_rems(64.0),
asset_inset: px_to_rems(10.0),
pins: px_to_rems(72.0),
place: px_to_rems(20.0),
place_mark: px_to_rems(8.0),
place_pip: px_to_rems(3.0),
}
}
}