ux: new style for current HEAD

This commit is contained in:
leo 2024-10-15 09:18:24 +08:00
parent 6908216de5
commit 4c60818d68
No known key found for this signature in database

View file

@ -77,12 +77,9 @@ namespace SourceGit.Views
var iconRect = new RoundedRect(new Rect(x, 0, 16, 16), new CornerRadius(2, 0, 0, 2));
var entireRect = new RoundedRect(new Rect(x, 0, item.Width, 16), new CornerRadius(2));
using (context.PushTransform(Matrix.CreateTranslation(x + 3, 3)))
context.DrawGeometry(fg, null, item.Icon);
if (item.IsHead)
{
using (context.PushOpacity(.4))
using (context.PushOpacity(.6))
context.DrawRectangle(item.Brush, null, entireRect);
context.DrawText(item.Label, new Point(x + 16, 8.0 - item.Label.Height * 0.5));
@ -99,6 +96,9 @@ namespace SourceGit.Views
context.DrawRectangle(null, new Pen(item.Brush), entireRect);
}
using (context.PushTransform(Matrix.CreateTranslation(x + 3, 3)))
context.DrawGeometry(fg, null, item.Icon);
x += item.Width + 4;
}
}