diff --git a/src/Resources/Themes.axaml b/src/Resources/Themes.axaml index f33e71d2..3194c8c3 100644 --- a/src/Resources/Themes.axaml +++ b/src/Resources/Themes.axaml @@ -25,7 +25,7 @@ #A7E1A7 #F19B9D #0000EE - #FFE5E5E5 + #FFE4E4E4 @@ -52,7 +52,7 @@ #A0308D3C #A09F4247 #4DAAFC - #FF2E2E2E + #FF383838 diff --git a/src/Views/CommitSubjectPresenter.cs b/src/Views/CommitSubjectPresenter.cs index 38e964be..18902462 100644 --- a/src/Views/CommitSubjectPresenter.cs +++ b/src/Views/CommitSubjectPresenter.cs @@ -104,23 +104,32 @@ namespace SourceGit.Views if (_inlines.Count == 0) return; - var height = Bounds.Height; - var width = Bounds.Width; - foreach (var inline in _inlines) + var ro = new RenderOptions() { - if (inline.X > width) - return; + TextRenderingMode = TextRenderingMode.SubpixelAntialias, + EdgeMode = EdgeMode.Antialias + }; - if (inline.Element is { Type: Models.InlineElementType.Code }) + using (context.PushRenderOptions(ro)) + { + var height = Bounds.Height; + var width = Bounds.Width; + foreach (var inline in _inlines) { - var rect = new Rect(inline.X, (height - inline.Text.Height - 2) * 0.5, inline.Text.WidthIncludingTrailingWhitespace + 8, inline.Text.Height + 2); - var roundedRect = new RoundedRect(rect, new CornerRadius(4)); - context.DrawRectangle(InlineCodeBackground, null, roundedRect); - context.DrawText(inline.Text, new Point(inline.X + 4, (height - inline.Text.Height) * 0.5)); - } - else - { - context.DrawText(inline.Text, new Point(inline.X, (height - inline.Text.Height) * 0.5)); + if (inline.X > width) + return; + + if (inline.Element is { Type: Models.InlineElementType.Code }) + { + var rect = new Rect(inline.X, (height - inline.Text.Height - 2) * 0.5, inline.Text.WidthIncludingTrailingWhitespace + 8, inline.Text.Height + 2); + var roundedRect = new RoundedRect(rect, new CornerRadius(4)); + context.DrawRectangle(InlineCodeBackground, null, roundedRect); + context.DrawText(inline.Text, new Point(inline.X + 4, (height - inline.Text.Height) * 0.5)); + } + else + { + context.DrawText(inline.Text, new Point(inline.X, (height - inline.Text.Height) * 0.5)); + } } } }