ux: head ref style in commit details panel

This commit is contained in:
leo 2024-10-15 10:00:24 +08:00
parent b44d4d26c9
commit 85e4f38654
No known key found for this signature in database

View file

@ -78,6 +78,7 @@ namespace SourceGit.Views
if (_items.Count == 0)
return;
var useGraphColor = UseGraphColor;
var fg = Foreground;
var x = 1.0;
foreach (var item in _items)
@ -86,9 +87,12 @@ namespace SourceGit.Views
var entireRect = new RoundedRect(new Rect(x, 0, item.Width, 16), new CornerRadius(2));
if (item.IsHead)
{
if (useGraphColor)
{
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));
}