Fix color picker selecting below alpha bar#5702
Merged
Merged
Conversation
Contributor
Author
|
Found that when you click and drag the eyedropper from the primary or secondary color up towards the color selector from below, it sets the color to mask on the border, which then disables the alpha bar functionality until the mouse moves off of the alpha bar. This doesn't feel very clean, so I changed it to match the functionality of the other edges, which just extend the color picker values to the border. Instead of returning the mask, it now selects from the lowest visible color selector bar (usually the alpha). This has the effect of the eyedropper appearing a few pixels out of bounds, although that mirrors the functionality of the other three edges. |
Collaborator
|
clang-tidy review says "All clean, LGTM! 👍" |
Member
|
Thanks for the patch @luke-henry-04 🙏 LGTM |
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.
Fixes #2006
I added a check in the color selector, making sure the user can't select from below the alpha bar. The outside border of the ui elements are included in the widget, but the alpha bar and bottom bar bounds are contained strictly inside of the color selector's border. One check makes sure the user isn't selecting the boundary underneath of the alpha bar bounds, and the other prevents the eyedropper tool from previewing colors beneath the alpha bar.
This fixes the issue in the parent
ColorSelectorclass rather than in each subclass individually, which also covers the RGB and RYB wheels not addressed in #2522I agree that my contributions are licensed under the Individual Contributor License Agreement V4.0 ("CLA") as stated in https://github.com/igarastudio/cla/blob/main/cla.md
I have signed the CLA following the steps given in https://github.com/igarastudio/cla#signing