mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
style<NameHighlightedTextBlock>: reduce required width of NameHighlightedTextBlock
This commit is contained in:
parent
e310cfd84f
commit
70512915f9
1 changed files with 5 additions and 2 deletions
|
@ -55,7 +55,8 @@ namespace SourceGit.Views {
|
||||||
typeface,
|
typeface,
|
||||||
FontSize,
|
FontSize,
|
||||||
Foreground);
|
Foreground);
|
||||||
return new Size(formatted.Width, formatted.Height);
|
|
||||||
|
return new Size(formatted.Width - 16, formatted.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Render(DrawingContext context) {
|
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));
|
context.DrawLine(underlinePen, new Point(offsetX, lineY), new Point(offsetX + formatted.Width, lineY));
|
||||||
offsetX += formatted.Width;
|
offsetX += formatted.Width;
|
||||||
} else {
|
} else {
|
||||||
offsetX += formatted.Width + 4;
|
offsetX += formatted.Width;
|
||||||
|
if (part.StartsWith(' ')) offsetX += 2;
|
||||||
|
if (part.EndsWith(' ')) offsetX += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
isName = !isName;
|
isName = !isName;
|
||||||
|
|
Loading…
Reference in a new issue