Fixing tests...

This commit is contained in:
Tig
2024-04-18 13:14:22 -06:00
parent a48146af82
commit f3b5ed7afc
7 changed files with 454 additions and 417 deletions

View File

@@ -175,7 +175,7 @@ public class TextFormatter
bool textWasNull = _text is null && value != null;
_text = EnableNeedsFormat (value);
if (/*(Alignment != TextAlignment.Justified && VerticalAlignment != VerticalTextAlignment.Justified) ||*/ (textWasNull && Size.IsEmpty))
// if (/*(Alignment != TextAlignment.Justified && VerticalAlignment != VerticalTextAlignment.Justified) ||*/ (textWasNull && Size.IsEmpty))
{
Size = CalcRect (0, 0, _text, Direction, TabWidth).Size;
}
@@ -304,7 +304,7 @@ public class TextFormatter
{
if (isVertical)
{
int runesWidth = GetWidestLineLength (linesFormatted, line, TabWidth);
int runesWidth = GetWidestLineLength (linesFormatted, 0, line, TabWidth);
x = screen.Right - runesWidth;
CursorPosition = screen.Width - runesWidth + (_hotKeyPos > -1 ? _hotKeyPos : 0);
}
@@ -335,7 +335,7 @@ public class TextFormatter
{
if (isVertical)
{
int runesWidth = GetWidestLineLength (linesFormatted, line, TabWidth);
int runesWidth = GetWidestLineLength (linesFormatted, 0, line, TabWidth);
x = screen.Left + line + (screen.Width - runesWidth) / 2;
CursorPosition = (screen.Width - runesWidth) / 2 + (_hotKeyPos > -1 ? _hotKeyPos : 0);