Skip to content

Align and Distribute layers - #191

Merged
robbietilton merged 3 commits into
robbietilton:mainfrom
rezaularif:align-distribute
Oct 26, 2026
Merged

robbietilton merged 3 commits into
robbietilton:mainfrom
rezaularif:align-distribute

Conversation

@rezaularif

Copy link
Copy Markdown
Contributor

Adds Align and Distribute for layers, from the Move tool's bar and the Layer menu, as in Photoshop.

What's added

  • Align: Left, Horizontal Centers or Right Edges, and Top, Vertical Centers or Bottom Edges.
  • Distribute: horizontal or vertical centers, or even spacing.
  • New buttons in the Move tool's bar, plus Layer › Align and Layer › Distribute submenus.
  • Each command is one undo step. Moves are whole pixels, and masks move with their layers.

How to use

  • Select layers in the Layers panel, then use the align or distribute buttons in the Move tool's bar (V), or Layer › Align / Distribute.
  • With a selection, layers align to it. With one layer selected, they align to the canvas. Otherwise they align to each other.
  • Distribute needs three or more layers. A selected folder moves as one item.

Tests

  • LayerAlignTests. The full suite passes, and the project format is unchanged.

Left, center or right edges, top, middle or bottom edges, and even
centers or spacing across three or more layers, as in Photoshop. Layers
line up to the selection when there is one, to the canvas when one layer
is selected, and otherwise to each other; a selected folder moves as one.
Moves are whole pixels, masks go with their layers, and each command is
one undo step. Layers are placed by their transform boxes, as snapping
places them.
robbietilton and others added 2 commits October 25, 2026 19:25
…r vertical, that a move in progress leaves available

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robbietilton
robbietilton merged commit 002737a into robbietilton:main Oct 26, 2026
@robbietilton

Copy link
Copy Markdown
Owner

Merged, thank you @rezaularif! The alignment logic is solid: aligning to the selection, the canvas or each other, folders moving as one, and one undo step each.

I changed the interface before merging, to keep the Move bar uncluttered. Instead of ten icon buttons, there's now a single Align button that opens a small panel of the same icons, horizontal on the top row and vertical on the bottom (align three ways, then distribute two). It also stays available while a move is still pending, since aligning commits it first. The Layer menu's Align and Distribute submenus are as you had them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants