Reamed Bounds -> ViewPort to see how it feels

This commit is contained in:
Tig
2024-03-14 07:30:27 -08:00
parent a5b1d6836e
commit f6ff36968e
78 changed files with 610 additions and 610 deletions

View File

@@ -432,14 +432,14 @@ public class ButtonTests
Assert.Equal (TextAlignment.Centered, btn.TextAlignment);
Assert.Equal ('_', btn.HotKeySpecifier.Value);
Assert.True (btn.CanFocus);
Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Bounds);
Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Viewport);
Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Frame);
Assert.Equal ($"{CM.Glyphs.LeftBracket} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
Assert.False (btn.IsDefault);
Assert.Equal (TextAlignment.Centered, btn.TextAlignment);
Assert.Equal ('_', btn.HotKeySpecifier.Value);
Assert.True (btn.CanFocus);
Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Bounds);
Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Viewport);
Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Frame);
Assert.Equal (string.Empty, btn.Title);
@@ -478,7 +478,7 @@ public class ButtonTests
Assert.True (btn.IsDefault);
Assert.Equal (TextAlignment.Centered, btn.TextAlignment);
Assert.True (btn.CanFocus);
Assert.Equal (new Rectangle (0, 0, 10, 1), btn.Bounds);
Assert.Equal (new Rectangle (0, 0, 10, 1), btn.Viewport);
Assert.Equal (new Rectangle (0, 0, 10, 1), btn.Frame);
Assert.Equal (KeyCode.T, btn.HotKey);
@@ -521,7 +521,7 @@ public class ButtonTests
";
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
Assert.Equal (new Rectangle (0, 0, 9, 1), btn.Bounds);
Assert.Equal (new Rectangle (0, 0, 9, 1), btn.Viewport);
Assert.Equal (new Rectangle (1, 2, 9, 1), btn.Frame);
}
@@ -762,7 +762,7 @@ public class ButtonTests
Assert.True (btn.IsInitialized);
Assert.Equal ("Say Hello 你", btn.Text);
Assert.Equal ($"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
Assert.Equal (new Rectangle (0, 0, 16, 1), btn.Bounds);
Assert.Equal (new Rectangle (0, 0, 16, 1), btn.Viewport);
var btnTxt = $"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}";
var expected = @$"
@@ -799,7 +799,7 @@ public class ButtonTests
Assert.True (btn.IsInitialized);
Assert.Equal ("Say Hello 你", btn.Text);
Assert.Equal ($"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
Assert.Equal (new Rectangle (0, 0, 16, 1), btn.Bounds);
Assert.Equal (new Rectangle (0, 0, 16, 1), btn.Viewport);
var btnTxt = $"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}";
var expected = @$"