Skip to content

Let hosts replace canvas control icons and opt out of viewport insets - #351

Merged
einari merged 3 commits into
mainfrom
canvas/control-icons-and-insets
Sep 27, 2026
Merged

einari merged 3 commits into
mainfrom
canvas/control-icons-and-insets

Conversation

@einari

@einari einari commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Added

  • controlsIcons on Canvas (icons on CanvasControls) replaces any of the minimap, zoom-out, zoom-in and help glyphs with your own icons. Unset fields keep the built-in icons, and the accessible names still come from controlsLabels.
  • controlsFollowViewportInsets on Canvas (followViewportInsets on CanvasControls) turns off the offset by --canvas-viewport-left/--canvas-viewport-right, for hosts that already move the canvas by that inset. It defaults to true, so existing canvases are unchanged.
  • The --canvas-viewport-left and --canvas-viewport-right custom properties the controls read are now documented.

The control bar drew a fixed set of icons, so an application using its
own icon set had controls that did not match the rest of its interface.
controlsIcons (icons on CanvasControls) replaces any subset of the
minimap, zoom and help glyphs; the accessible names still come from the
labels.

The bar also always stepped aside by --canvas-viewport-left/right, which
moves it twice when the host has already shifted the canvas by that
inset. controlsFollowViewportInsets (followViewportInsets) turns the
offset off; it stays on by default, so nothing changes for existing
hosts.
The --canvas-viewport-left/right custom properties were read by the
controls but never documented; describe them together with the switch
that turns them off.
@einari einari added the minor label Sep 27, 2026
@einari
einari merged commit fe2c93a into main Sep 27, 2026
50 checks passed
@einari
einari deleted the canvas/control-icons-and-insets branch September 27, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant