mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 10:22:13 +08:00
style<NameHighlightedTextBlock>: reduce required width of NameHighlightedTextBlock
This commit is contained in:
@@ -55,7 +55,8 @@ namespace SourceGit.Views {
|
||||
typeface,
|
||||
FontSize,
|
||||
Foreground);
|
||||
return new Size(formatted.Width, formatted.Height);
|
||||
|
||||
return new Size(formatted.Width - 16, formatted.Height);
|
||||
}
|
||||
|
||||
public override void Render(DrawingContext context) {
|
||||
@@ -90,7 +91,9 @@ namespace SourceGit.Views {
|
||||
context.DrawLine(underlinePen, new Point(offsetX, lineY), new Point(offsetX + formatted.Width, lineY));
|
||||
offsetX += formatted.Width;
|
||||
} else {
|
||||
offsetX += formatted.Width + 4;
|
||||
offsetX += formatted.Width;
|
||||
if (part.StartsWith(' ')) offsetX += 2;
|
||||
if (part.EndsWith(' ')) offsetX += 4;
|
||||
}
|
||||
|
||||
isName = !isName;
|
||||
|
||||
Reference in New Issue
Block a user