mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
style<*>: use mono font for all contents
This commit is contained in:
parent
70512915f9
commit
c73c5372d2
15 changed files with 67 additions and 64 deletions
|
@ -64,7 +64,7 @@ namespace SourceGit.Views {
|
|||
if (string.IsNullOrEmpty(text)) return;
|
||||
|
||||
var normalTypeface = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Normal, FontStretch.Normal);
|
||||
var highlightTypeface = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Bold, FontStretch.Normal);
|
||||
//var highlightTypeface = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Bold, FontStretch.Normal);
|
||||
var underlinePen = new Pen(Foreground, 1);
|
||||
var offsetX = 0.0;
|
||||
|
||||
|
@ -80,20 +80,20 @@ namespace SourceGit.Views {
|
|||
part,
|
||||
CultureInfo.CurrentCulture,
|
||||
FlowDirection.LeftToRight,
|
||||
isName ? highlightTypeface : normalTypeface,
|
||||
//isName ? highlightTypeface : normalTypeface,
|
||||
normalTypeface,
|
||||
FontSize,
|
||||
Foreground);
|
||||
|
||||
context.DrawText(formatted, new Point(offsetX, 0));
|
||||
|
||||
if (isName) {
|
||||
var lineY = formatted.Baseline + 2;
|
||||
offsetX += 4;
|
||||
context.DrawText(formatted, new Point(offsetX, 0));
|
||||
context.DrawLine(underlinePen, new Point(offsetX, lineY), new Point(offsetX + formatted.Width, lineY));
|
||||
offsetX += formatted.Width;
|
||||
offsetX += formatted.Width + 4;
|
||||
} else {
|
||||
context.DrawText(formatted, new Point(offsetX, 0));
|
||||
offsetX += formatted.Width;
|
||||
if (part.StartsWith(' ')) offsetX += 2;
|
||||
if (part.EndsWith(' ')) offsetX += 4;
|
||||
}
|
||||
|
||||
isName = !isName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue