From 22f0fb38542de3934dc78e2bf3c8e8a56a06019c Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 10 Sep 2024 11:26:07 +0800 Subject: [PATCH] ux: rounded rect in ColorPicker --- src/Views/ColorPicker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Views/ColorPicker.cs b/src/Views/ColorPicker.cs index a49be1ca..d1aa3510 100644 --- a/src/Views/ColorPicker.cs +++ b/src/Views/ColorPicker.cs @@ -115,13 +115,13 @@ namespace SourceGit.Views var y = 6 * 32 + 8; var x = 0; - context.FillRectangle(new SolidColorBrush(_darkestColor), new Rect(x, y, 32, 32)); x += 32; + context.DrawRectangle(new SolidColorBrush(_darkestColor), null, new RoundedRect(new Rect(x, y, 32, 32), new CornerRadius(4, 0, 0, 4))); x += 32; context.FillRectangle(new SolidColorBrush(_darkerColor), new Rect(x, y, 32, 32)); x += 32; context.FillRectangle(new SolidColorBrush(_darkColor), new Rect(x, y, 32, 32)); x += 32; context.FillRectangle(new SolidColorBrush(_color), new Rect(x, y - 4, 64, 40), 4); x += 64; context.FillRectangle(new SolidColorBrush(_lightColor), new Rect(x, y, 32, 32)); x += 32; context.FillRectangle(new SolidColorBrush(_lighterColor), new Rect(x, y, 32, 32)); x += 32; - context.FillRectangle(new SolidColorBrush(_lightestColor), new Rect(x, y, 32, 32)); + context.DrawRectangle(new SolidColorBrush(_lightestColor), null, new RoundedRect(new Rect(x, y, 32, 32), new CornerRadius(0, 4, 4, 0))); } }