ux: new style for inline code in commit subject

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-07 20:23:06 +08:00
parent 0a7b973388
commit 6df38ad970
No known key found for this signature in database
2 changed files with 25 additions and 16 deletions

View file

@ -25,7 +25,7 @@
<Color x:Key="Color.Diff.AddedHighlight">#A7E1A7</Color> <Color x:Key="Color.Diff.AddedHighlight">#A7E1A7</Color>
<Color x:Key="Color.Diff.DeletedHighlight">#F19B9D</Color> <Color x:Key="Color.Diff.DeletedHighlight">#F19B9D</Color>
<Color x:Key="Color.Link">#0000EE</Color> <Color x:Key="Color.Link">#0000EE</Color>
<Color x:Key="Color.InlineCode">#FFE5E5E5</Color> <Color x:Key="Color.InlineCode">#FFE4E4E4</Color>
</ResourceDictionary> </ResourceDictionary>
<ResourceDictionary x:Key="Dark"> <ResourceDictionary x:Key="Dark">
@ -52,7 +52,7 @@
<Color x:Key="Color.Diff.AddedHighlight">#A0308D3C</Color> <Color x:Key="Color.Diff.AddedHighlight">#A0308D3C</Color>
<Color x:Key="Color.Diff.DeletedHighlight">#A09F4247</Color> <Color x:Key="Color.Diff.DeletedHighlight">#A09F4247</Color>
<Color x:Key="Color.Link">#4DAAFC</Color> <Color x:Key="Color.Link">#4DAAFC</Color>
<Color x:Key="Color.InlineCode">#FF2E2E2E</Color> <Color x:Key="Color.InlineCode">#FF383838</Color>
</ResourceDictionary> </ResourceDictionary>
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>

View file

@ -104,6 +104,14 @@ namespace SourceGit.Views
if (_inlines.Count == 0) if (_inlines.Count == 0)
return; return;
var ro = new RenderOptions()
{
TextRenderingMode = TextRenderingMode.SubpixelAntialias,
EdgeMode = EdgeMode.Antialias
};
using (context.PushRenderOptions(ro))
{
var height = Bounds.Height; var height = Bounds.Height;
var width = Bounds.Width; var width = Bounds.Width;
foreach (var inline in _inlines) foreach (var inline in _inlines)
@ -124,6 +132,7 @@ namespace SourceGit.Views
} }
} }
} }
}
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{ {