From 85e4f3865479cba4624ee9faebae5e8dc3595c78 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 15 Oct 2024 10:00:24 +0800 Subject: [PATCH] ux: head ref style in commit details panel --- src/Views/CommitRefsPresenter.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Views/CommitRefsPresenter.cs b/src/Views/CommitRefsPresenter.cs index 36302dbf..852f63e8 100644 --- a/src/Views/CommitRefsPresenter.cs +++ b/src/Views/CommitRefsPresenter.cs @@ -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) @@ -87,8 +88,11 @@ namespace SourceGit.Views if (item.IsHead) { - using (context.PushOpacity(.6)) - context.DrawRectangle(item.Brush, null, entireRect); + 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)); }