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) if (_items.Count == 0)
return; return;
var useGraphColor = UseGraphColor;
var fg = Foreground; var fg = Foreground;
var x = 1.0; var x = 1.0;
foreach (var item in _items) foreach (var item in _items)
@ -87,8 +88,11 @@ namespace SourceGit.Views
if (item.IsHead) if (item.IsHead)
{ {
using (context.PushOpacity(.6)) if (useGraphColor)
context.DrawRectangle(item.Brush, null, entireRect); {
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)); context.DrawText(item.Label, new Point(x + 16, 8.0 - item.Label.Height * 0.5));
} }