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

quickfix for occasional color reset to white on recomposition #57

Merged
merged 1 commit into from
May 8, 2024

Conversation

sderr
Copy link
Contributor

@sderr sderr commented May 8, 2024

On rare occasions (was seen using a color picker in an animated widget) the color picker will reset the selected color to white after a recomposition.

This seems to be due to onSizeChanged() being called, even though the color picker did not really change size.

For the HSV color picker it is possible to re-select automatically the previously picked color, since the coordinates can be calculated. For the ImageColorPicker, a more elaborate fix would be needed.

On rare occasions, (was seen using a color picker in an animated
widget) the color picker will reset the selected color to white after a
recomposition.

This seems to be due to onSizeChanged() being called, even though the
color picker did not really change size.

For the HSV color picker it is possible to re-select automatically the
previously picked color, since the coordinates can be calculated. For
the ImageColorPicker, a more elaborate fix would be needed.
@sderr sderr requested a review from skydoves as a code owner May 8, 2024 21:17
Copy link
Owner

@skydoves skydoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. Thank you for your contribution, @sderr!

@skydoves skydoves merged commit 7112a71 into skydoves:main May 8, 2024
3 checks passed
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.

2 participants