Skip to content

Canvas polish: Shift-constrain shapes, accent tint, rails follow transparency (#42)#43

Closed
ojowwalker77 wants to merge 1 commit into
release-1.2.3from
claude/modest-leakey-f8cad5
Closed

Canvas polish: Shift-constrain shapes, accent tint, rails follow transparency (#42)#43
ojowwalker77 wants to merge 1 commit into
release-1.2.3from
claude/modest-leakey-f8cad5

Conversation

@ojowwalker77

Copy link
Copy Markdown
Owner

Three bundled polish items. All changes are material/color/gesture only — the protected board + dock + toolbar window composition (PanelController geometry, dock width/gap, rail gutters, toolbar centering) is untouched.

1. Canvas drawing polish — Shift to constrain

Holding Shift while drawing or resizing snaps rectangle→square, ellipse→circle, diamond→uniform. Read live off the modifier flags so pressing/releasing Shift mid-gesture updates the shape immediately. Lines, arrows, and freehand stay freeform.

  • constrainsToSquare on CanvasTool and CanvasElementKind (box shapes only).
  • Draw: a constrained(_:from:event:) helper squares the drag end in the board input view (preview + commit).
  • Resize: applyResize squares the box to its larger side, anchored at the opposite corner.

2. Appearance controls — accent tint

A restrained accent picker in Settings ▸ Appearance: System (default, macOS accent) + 7 muted hues.

  • New AccentTint enum and a single Color.appTint token in Theme; all Color.accentColor sites and the two Theme.Palette selection fills route through it, so selection, the active tool, primary actions, and native controls shift together.
  • Why a token, not Color.accentColor: on macOS a custom accent only applies under the "Multicolor" system setting, so it can't be overridden reliably at runtime.
  • The three hosting roots (board, Agent, Settings) observe the pref via @AppStorage and apply .tint(...) so the UI re-tints live.

3. Fix #42 — side rails follow board transparency

The Settings/Agent panels already shared the board's glass; the fixed surfaces were the floating rails (left action rail + top toolbar). railSurface() now tracks the transparency slider and recedes on the same curve as the board (kept slightly denser for legibility), so the whole workspace stays consistent as transparency increases.

Verification

  • ./script/build_and_run.sh bundle compiles clean (only pre-existing Text + deprecation warnings).
  • App launches and stays running.
  • Not visually verified from the automation environment — worth a glance at the accent swatches and the rails at high transparency.

Changelog updated under [Unreleased] (Added: Shift-constrain, accent tint; Fixed: #42).

…parency

Canvas drawing polish: holding Shift while drawing or resizing a rectangle,
ellipse, or diamond snaps the bounding box to a square (square / circle /
uniform diamond). Read live off the modifier flags so pressing/releasing Shift
mid-gesture updates the shape; lines, arrows, and freehand stay unconstrained.

Appearance: a restrained accent picker in Settings > Appearance (System + 7
muted hues), routed through a single Color.appTint token so selection, the
active tool, primary actions, and native controls all shift together. System
is the default and preserves current behavior.

Fix #42: railSurface() now tracks the panel-transparency slider so the left
rail and top toolbar recede with the board and the Agent/Settings panels
instead of staying fixed and heavy at high transparency.

No changes to the protected window composition (PanelController geometry, dock
width/gap, rail gutters, toolbar centering) — material/color/gesture only.
@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant