mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
ux: better line number layout
This commit is contained in:
parent
ecc1414006
commit
55d2657799
1 changed files with 3 additions and 3 deletions
|
@ -104,7 +104,7 @@ namespace SourceGit.Views
|
||||||
if (string.IsNullOrEmpty(lineNumber))
|
if (string.IsNullOrEmpty(lineNumber))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var y = line.GetTextLineVisualYPosition(line.TextLines[0], VisualYPosition.TextTop) - view.VerticalOffset;
|
var y = line.GetTextLineVisualYPosition(line.TextLines[0], VisualYPosition.LineMiddle) - view.VerticalOffset;
|
||||||
var txt = new FormattedText(
|
var txt = new FormattedText(
|
||||||
lineNumber,
|
lineNumber,
|
||||||
CultureInfo.CurrentCulture,
|
CultureInfo.CurrentCulture,
|
||||||
|
@ -112,7 +112,7 @@ namespace SourceGit.Views
|
||||||
typeface,
|
typeface,
|
||||||
presenter.FontSize,
|
presenter.FontSize,
|
||||||
presenter.Foreground);
|
presenter.Foreground);
|
||||||
context.DrawText(txt, new Point(Bounds.Width - txt.Width, y));
|
context.DrawText(txt, new Point(Bounds.Width - txt.Width, y - txt.Height * 0.5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
_lineStyleTransformer = new LineStyleTransformer(this);
|
_lineStyleTransformer = new LineStyleTransformer(this);
|
||||||
|
|
||||||
TextArea.TextView.Margin = new Thickness(4, 0);
|
TextArea.TextView.Margin = new Thickness(2, 0);
|
||||||
TextArea.TextView.Options.EnableHyperlinks = false;
|
TextArea.TextView.Options.EnableHyperlinks = false;
|
||||||
TextArea.TextView.Options.EnableEmailHyperlinks = false;
|
TextArea.TextView.Options.EnableEmailHyperlinks = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue