Skip to content

Commit 689eb4d

Browse files
committed
Fix hue ring thumb not scaling with stroke width
1 parent 8f02ed7 commit 689eb4d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/src/palette.dart

+12-3
Original file line numberDiff line numberDiff line change
@@ -550,18 +550,27 @@ class HueRingPainter extends CustomPainter {
550550
center.dx + radio * cos((hsvColor.hue * pi / 180)),
551551
center.dy - radio * sin((hsvColor.hue * pi / 180)),
552552
);
553-
canvas.drawShadow(Path()..addOval(Rect.fromCircle(center: offset, radius: 12)), Colors.black, 3.0, true);
553+
canvas.drawShadow(
554+
Path()
555+
..addOval(Rect.fromCircle(
556+
center: offset,
557+
radius: strokeWidth / 2 + strokeWidth * 0.1,
558+
)),
559+
Colors.black,
560+
3.0,
561+
true,
562+
);
554563
canvas.drawCircle(
555564
offset,
556-
size.height * 0.04,
565+
strokeWidth / 1.8,
557566
Paint()
558567
..color = Colors.white
559568
..style = PaintingStyle.fill,
560569
);
561570
if (displayThumbColor) {
562571
canvas.drawCircle(
563572
offset,
564-
size.height * 0.03,
573+
strokeWidth / 2 - strokeWidth * 0.1,
565574
Paint()
566575
..color = hsvColor.toColor()
567576
..style = PaintingStyle.fill,

0 commit comments

Comments
 (0)