Skip to content

Tidy the desktop paint editor layout - #12

Merged
Mistium merged 8 commits into
developfrom
paint-tidy-layout
Nov 14, 2026
Merged

Mistium merged 8 commits into
developfrom
paint-tidy-layout

Conversation

@Mistium

@Mistium Mistium commented Nov 14, 2026

Copy link
Copy Markdown
Member

The desktop paint editor gets a tidier layout that is quicker to use. The phone layout (600px wide and below) is unchanged.

What changed

  • Tool rail. One column of tools, each showing its key. P now picks the pen (S, A, B, E, F, T, L, C and R already worked, they were just never shown). Rounded rectangle, triangle, shapes and arrow open in a flyout beside the rail, which closes on Escape.
  • Header. Rounded groups instead of labelled buttons with dashed dividers: name, undo, redo, fill, outline and outline width on the first row, arrange actions and the current tool's options on the second. On a very wide editor it all sits on one row.
  • Number fields. Brush size, smoothing, outline width, corner size, sides and spoke ratio are typed fields with minus and plus buttons. Holding a button keeps stepping.
  • Bottom bar. A Vector/Bitmap switch replaces "Convert to Bitmap", and the zoom group shows the zoom percentage, which goes back to 100% when clicked.
  • Short and narrow windows. The rail folds into two columns, the arrange buttons collapse into an Arrange menu so the header is the same height in every tool, the bottom bar wraps, and the editor scrolls as a last resort. The editor now fits a 1280x600 window, which the old layout did not.
  • Dark themes. Image-based tool icons (the line tool and every bitmap tool) now match the rest of the rail.
  • Keyboard and screen readers. Tool, colour and zoom buttons show a focus ring, colour buttons can be opened from the keyboard, and the zoom buttons have translatable labels. The Arrange, font and shape menus open from the keyboard too: Enter, Space or the down arrow open them, the arrow keys move between items, Enter runs one, and Escape closes the menu and returns to its button. A menu opened with the mouse or a tap behaves as before and never leaves focus on its button, so arrow keys keep nudging the selection.

Not in this pull request: typed position and size fields for the selection, and layers. Layers are the next step.

Version

0.2.0 to 0.3.0 (new feature, backwards compatible).

Merge order

Merge this before the scratch-gui pull request that pins it. Cloudflare builds of scratch-gui take the latest scratch-paint develop, so the gui preview only shows this layout once this is merged. The gui pull request also removes old tablet rules that would clip the new tool rail between 601px and 900px.

Checks

  • npx jest: 26 suites, 126 tests pass
  • node scripts/check-conventions.mjs --base=origin/develop: ok
  • npx webpack --bail: builds
  • Checked inside scratch-gui in Chromium and Firefox: vector and bitmap, light and dark, right-to-left, windows from 480px tall to 2300px wide, and the phone layout against the old build

Screenshots

Select tool, before and after:

Before After
The old paint editor with labelled header buttons and a two-column tool palette The new paint editor with grouped header buttons and a one-column tool rail

Brush tool, before and after. Size and smoothing are typed fields with steppers:

Before After
The old brush options The new brush options with stepper fields

Bitmap costume, before and after:

Before After
The old bitmap editor The new bitmap editor

More shapes open in a column beside the rail:

The shapes flyout open beside the tool rail

Dark theme, vector and bitmap:

Vector Bitmap
Dark theme with a vector costume Dark theme with a bitmap costume

A very wide editor puts the whole header on one row:

The header on a single row in a wide window

A narrow editor (1024px window) moves the arrange actions into a menu:

A narrow editor with the Arrange menu beside undo and redo

The Arrange menu opened and driven from the keyboard:

The Arrange menu open with a focus ring on Group

A short editor (1280x640 window) folds the rail into two columns:

A short editor with a two-column tool rail

Steppers, the shapes flyout and the zoom readout in use:

Recording of stepping the brush size, picking a shape from the flyout and resetting the zoom

Rebuild the desktop layout around pill groups, a single-column tool rail and
a bottom bar, in the style of the sound editor. The phone layout is unchanged.

- Header: costume name, undo and redo, fill, outline and outline width, then
  the tools for the current mode. Two slim rows, or one row when the editor is
  wide enough.
- Number fields get minus and plus buttons that repeat while held, in place of
  bare inputs.
- Tool rail: one column with each tool's key shown on its button, and the less
  common shapes in a flyout that opens as a column beside the rail.
- Bottom bar: a Vector and Bitmap switch, and a zoom readout that returns to
  100% when clicked.
- P selects the pen.
- The brush shape and text alignment buttons now show which option is active.

Version 0.2.0 to 0.3.0.
The number steppers now show the stepped value after typing, stop a held
button when the field is switched off or the window loses focus, and land
on whole steps from a fractional value. The shapes flyout opens upward so
it stays inside the editor, closes on Escape, and no longer relies on a
parent element carrying dir. Zoom and colour buttons get proper labels and
keyboard focus.
The tool rail no longer sets a minimum height for the editor: it shrinks,
folds into two columns when the window is short, and the editor scrolls as
a last resort, so the bottom bar and the costume list stay reachable. The
arrange buttons collapse into an Arrange menu when the editor is too narrow
to show them beside the tool options, which keeps the header the same
height in every tool. The bottom bar wraps instead of clipping its zoom
buttons.
The Arrange menu that replaces the arrange buttons in narrow windows
could only be opened with a pointer. The trigger is now a focusable
button: Enter, Space or the down arrow open it on the first item, the
arrow keys, Home and End move between items, Enter and Space run the
focused item, and Escape or Tab close it and return focus to the
trigger. Font menu items preview on focus the same way they do on
hover. The Arrange menu also gets its divider on desktop, and the dark
toolbar icon filter is limited to the desktop layout.
Opening the Arrange menu with the down arrow also nudged the selection,
because the key carried on to the canvas tools. The trigger now handles
its keys before they leave it. Focus rings on menu items sit inside the
menu so a scrolling menu cannot clip them.
Opening a menu with the mouse left focus on its trigger, and closing a
menu moved focus back there, so the down arrow reopened the menu instead
of nudging the selection. Keyboard handling now only applies to a menu
that was opened from the keyboard: a pointer click never leaves focus on
the trigger and closing does not move focus. Holding the key that opened
a menu no longer runs its first item, left and right move between items,
shortcuts pass through, and the caret is hidden from the trigger's
accessible name.
Font items are chosen by whatever was previewed last. A pointer resting
over the open menu re-previews the item under it, so Enter on a focused
font committed the hovered one. Running an item from the keyboard now
previews it again first.
@Mistium
Mistium merged commit aa3d334 into develop Nov 14, 2026
3 checks passed
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.

1 participant