Canvas polish: Shift-constrain shapes, accent tint, rails follow transparency (#42)#43
Closed
ojowwalker77 wants to merge 1 commit into
Closed
Canvas polish: Shift-constrain shapes, accent tint, rails follow transparency (#42)#43ojowwalker77 wants to merge 1 commit into
ojowwalker77 wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bundled polish items. All changes are material/color/gesture only — the protected board + dock + toolbar window composition (
PanelControllergeometry, 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.
constrainsToSquareonCanvasToolandCanvasElementKind(box shapes only).constrained(_:from:event:)helper squares the drag end in the board input view (preview + commit).applyResizesquares 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.
AccentTintenum and a singleColor.appTinttoken inTheme; allColor.accentColorsites and the twoTheme.Paletteselection fills route through it, so selection, the active tool, primary actions, and native controls shift together.Color.accentColor: on macOS a custom accent only applies under the "Multicolor" system setting, so it can't be overridden reliably at runtime.@AppStorageand 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 bundlecompiles clean (only pre-existingText +deprecation warnings).Changelog updated under [Unreleased] (Added: Shift-constrain, accent tint; Fixed: #42).