Skip to content

Fix #578: a drag on the Color panel's spectrum no longer flickers near white - #591

Merged
bflatastic merged 1 commit into
mainfrom
fix/issue-578
Oct 8, 2026
Merged

bflatastic merged 1 commit into
mainfrom
fix/issue-578

Conversation

@bflatastic

Copy link
Copy Markdown
Member

Dragging a colour towards white in the Color panel no longer makes the object flicker.

Cause: the out-of-gamut and out-of-web warnings under the Color panel's proxy appeared only when the colour needed them, so the panel's height changed with the colour. Along the spectrum's pale top edge, a colour out of the CMYK gamut added a warning row. The spectrum then moved 10 px down under the pointer, the pointer was now above it and picked white, the warning went away and the spectrum moved back up. With the pointer held still, the fill alternated every frame between the pale colour and #FFFFFF. A headless probe saw 310 flips in 400 frames. Darker colours don't flicker because they don't toggle the gamut warning.

Fix: panels/color.rs keeps room, as invisible chips, for the warnings the panel's mode can show (gamut in RGB/HSB, web outside Web Safe RGB and Grayscale). The panel's height now depends on the mode, not the colour. When no warning is showing, RGB mode has about 10 px of empty space under the proxy.

  • Test a_drag_on_the_spectrum_holds_still_near_white:
    • The panel has one height for white, #fefefe (web warning) and #ded3ff (both warnings).
    • During a drag along the spectrum's top edge, the fill holds while the pointer stops.
    • It fails on main with heights [226.375, 226.375, 236.375].
  • ROADMAP Last updated.

Checked live on Windows:

  • The Color panel looks the same with #DED3FF (both warnings shown) and #FFFFFF (none); the spectrum stays in place.
  • A drag along the spectrum's top ends on the pale colour under the pointer.
  • I could not check on macOS, where the issue was reported.

Checks

  • Based on origin/main d066e0d.
  • cargo test -p vectorcraft-ui-egui, cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings, cargo fmt --all, cargo xtask wasm.

🤖 Generated with Claude Code

…r white

The Color panel shows the out-of-gamut and out-of-web warnings under its
proxy only when the colour needs them, so the panel grew and shrank with
the colour. Dragging on the spectrum's pale top edge, a colour out of
gamut added a warning, the spectrum moved down under the pointer, the
pointer then picked white (above the spectrum), the warning went away,
the spectrum moved back up: the colour flipped every frame.

The panel now keeps room for the warnings its mode can show, so its
height no longer depends on the colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic
bflatastic merged commit f4b4312 into main Oct 8, 2026
bflatastic added a commit that referenced this pull request Oct 8, 2026
Land #591 (fix #578: no flicker dragging the Color spectrum near white)
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