mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Reamed Bounds -> ViewPort to see how it feels
This commit is contained in:
@@ -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 = @$"
|
||||
|
||||
Reference in New Issue
Block a user