Repository navigation
Fix #578: a drag on the Color panel's spectrum no longer flickers near white - #591
Merged
Merged
Conversation
…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>
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.
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.rskeeps 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.a_drag_on_the_spectrum_holds_still_near_white:#fefefe(web warning) and#ded3ff(both warnings).[226.375, 226.375, 236.375].Checked live on Windows:
#DED3FF(both warnings shown) and#FFFFFF(none); the spectrum stays in place.Checks
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