Skip to content

Commit

Permalink
Fix hue ring thumb not scaling with stroke width
Browse files Browse the repository at this point in the history
  • Loading branch information
JCapucho committed Aug 4, 2022
1 parent e85f122 commit 0e16dac
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/src/palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -550,18 +550,27 @@ class HueRingPainter extends CustomPainter {
center.dx + radio * cos((hsvColor.hue * pi / 180)),
center.dy - radio * sin((hsvColor.hue * pi / 180)),
);
canvas.drawShadow(Path()..addOval(Rect.fromCircle(center: offset, radius: 12)), Colors.black, 3.0, true);
canvas.drawShadow(
Path()
..addOval(Rect.fromCircle(
center: offset,
radius: strokeWidth / 2 + strokeWidth * 0.1,
)),
Colors.black,
3.0,
true,
);
canvas.drawCircle(
offset,
size.height * 0.04,
strokeWidth / 1.8,
Paint()
..color = Colors.white
..style = PaintingStyle.fill,
);
if (displayThumbColor) {
canvas.drawCircle(
offset,
size.height * 0.03,
strokeWidth / 2 - strokeWidth * 0.1,
Paint()
..color = hsvColor.toColor()
..style = PaintingStyle.fill,
Expand Down

0 comments on commit 0e16dac

Please sign in to comment.