mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-15 23:54:58 +00:00
enhance: ignores $
char when measuring contents in NamedHighlightedTextBlock
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
6517e78ab6
commit
ee2e7d0127
1 changed files with 2 additions and 1 deletions
|
@ -55,9 +55,10 @@ namespace SourceGit.Views
|
||||||
if (string.IsNullOrEmpty(text))
|
if (string.IsNullOrEmpty(text))
|
||||||
return base.MeasureOverride(availableSize);
|
return base.MeasureOverride(availableSize);
|
||||||
|
|
||||||
|
var trimmed = text.Replace("$", "");
|
||||||
var typeface = new Typeface(FontFamily);
|
var typeface = new Typeface(FontFamily);
|
||||||
var formatted = new FormattedText(
|
var formatted = new FormattedText(
|
||||||
Text,
|
trimmed,
|
||||||
CultureInfo.CurrentCulture,
|
CultureInfo.CurrentCulture,
|
||||||
FlowDirection.LeftToRight,
|
FlowDirection.LeftToRight,
|
||||||
typeface,
|
typeface,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue