Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color selector #3120

Merged
merged 6 commits into from
Apr 23, 2022
Merged

Color selector #3120

merged 6 commits into from
Apr 23, 2022

Conversation

artdeell
Copy link
Member

It's (probably) done! Now we can remove the color selector dependency!

Changed up the layout
Now both sliders return color events
Made the luminosity/intensity square actually represent what will be selected
Added the ability for hue/lim/int listeners to check if the event was generated by tapping, or by setting the value.
Changed up layout (again)
Removed ColorSelectionListener for now
Added AlphaView and AlphaSelectionListener for selecting alpha (transparency)
Removed all divisions from onDraw() calls
Added side by side (alpha, non-alpha color view)
Removed "tapping" from all listeners (since it became pointless)
Now all listeners don't fire events when the values are set programmatically
Remove unneeded logging
Clean up typos
Other changes:
The ColorSelectionListener is back!
Now ColorSelector.runColor(int) is used for unified initialization
Added invalidate flag into SVRectangleView.setColor() to avoid a useless invalidation in runColor()
Moved repeating Color.HSVtoColor into ColorSelector.dispatchColorChange()
Fixed a bug: mAlphaSelected wasn't set to the appropriate value by runColor, leading to the Color Preview and HEX edit breaking in some cases
Added access modifiers (why :despair:)
Moved the cast
Added error reporting if the tex in the HEX edit box is not a valid HEX value (by making the text red)
@Mathias-Boulay
Copy link
Contributor

Seems good enough to me

@artdeell artdeell merged commit d89a832 into v3_openjdk Apr 23, 2022
@Mathias-Boulay Mathias-Boulay deleted the color-selector branch June 14, 2023 21:24
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.

None yet

2 participants