mchome / flutter_colorpicker

HSV(HSB)/HSL/RGB/Material color picker inspired by all the good design for your amazing flutter apps.
https://pub.dev/packages/flutter_colorpicker
MIT License
339 stars 198 forks source link

Fix stroke width scaling in hue ring #86

Open JCapucho opened 1 year ago

JCapucho commented 1 year ago

The hue ring despite accepting a different stroke width from 20.0 seems to have some bits hard coded in such a way that different values cause the ui to not render correctly.

This PR fixes that by first ensuring that the HueRingPainter always renders inbound (see the first commit message for more information about the problem), secondly by changing the hard coded parts to scale with stroke width and finally by also scaling the thumb of the ring.

Old New
Normal stroke width 20.0 old-normal old-big
Big stroke width 40.0 new-normal new-big