mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Merge branch 'v2_develop' into v2_fixes_2432_Dim_AutoSize
This commit is contained in:
@@ -419,7 +419,6 @@ ssb
|
||||
new Attribute (ColorName.White, ColorName.Black),
|
||||
new Attribute (ColorName.Blue, ColorName.Black),
|
||||
default (Rect),
|
||||
true,
|
||||
driver
|
||||
);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
||||
@@ -427,6 +426,61 @@ ssb
|
||||
driver.End ();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SetupFakeDriver]
|
||||
public void FillRemaining_True_False ()
|
||||
{
|
||||
((FakeDriver)Application.Driver).SetBufferSize (22, 5);
|
||||
|
||||
Attribute [] attrs =
|
||||
{
|
||||
Attribute.Default, new Attribute (ColorName.Green, ColorName.BrightMagenta),
|
||||
new Attribute (ColorName.Blue, ColorName.Cyan)
|
||||
};
|
||||
var tf = new TextFormatter { Size = new Size (14, 3), Text = "Test\nTest long\nTest long long\n", MultiLine = true };
|
||||
|
||||
tf.Draw (
|
||||
new Rect (1, 1, 19, 3),
|
||||
attrs [1],
|
||||
attrs [2]);
|
||||
|
||||
Assert.False (tf.FillRemaining);
|
||||
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (
|
||||
@"
|
||||
Test
|
||||
Test long
|
||||
Test long long",
|
||||
_output);
|
||||
|
||||
TestHelpers.AssertDriverAttributesAre (
|
||||
@"
|
||||
000000000000000000000
|
||||
011110000000000000000
|
||||
011111111100000000000
|
||||
011111111111111000000
|
||||
000000000000000000000",
|
||||
null,
|
||||
attrs);
|
||||
|
||||
tf.FillRemaining = true;
|
||||
|
||||
tf.Draw (
|
||||
new Rect (1, 1, 19, 3),
|
||||
attrs [1],
|
||||
attrs [2]);
|
||||
|
||||
TestHelpers.AssertDriverAttributesAre (
|
||||
@"
|
||||
000000000000000000000
|
||||
011111111111111111110
|
||||
011111111111111111110
|
||||
011111111111111111110
|
||||
000000000000000000000",
|
||||
null,
|
||||
attrs);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData ("_k Before", true, 0, (KeyCode)'K')] // lower case should return uppercase Hotkey
|
||||
[InlineData ("a_k Second", true, 1, (KeyCode)'K')]
|
||||
@@ -2010,7 +2064,6 @@ ssb
|
||||
new Attribute (ColorName.White, ColorName.Black),
|
||||
new Attribute (ColorName.Blue, ColorName.Black),
|
||||
default (Rect),
|
||||
true,
|
||||
driver
|
||||
);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
||||
@@ -2049,7 +2102,6 @@ ssb
|
||||
new Attribute (ColorName.White, ColorName.Black),
|
||||
new Attribute (ColorName.Blue, ColorName.Black),
|
||||
default (Rect),
|
||||
true,
|
||||
driver
|
||||
);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
||||
@@ -2088,7 +2140,6 @@ ssb
|
||||
new Attribute (ColorName.White, ColorName.Black),
|
||||
new Attribute (ColorName.Blue, ColorName.Black),
|
||||
default (Rect),
|
||||
true,
|
||||
driver
|
||||
);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
||||
|
||||
@@ -179,7 +179,7 @@ Test
|
||||
tf1.Text = "This TextFormatter (tf1) without fill will not be cleared on rewritten.";
|
||||
Size tf1Size = tf1.Size;
|
||||
|
||||
var tf2 = new TextFormatter { Direction = TextDirection.LeftRight_TopBottom };
|
||||
var tf2 = new TextFormatter { Direction = TextDirection.LeftRight_TopBottom, FillRemaining = true };
|
||||
tf2.Text = "This TextFormatter (tf2) with fill will be cleared on rewritten.";
|
||||
Size tf2Size = tf2.Size;
|
||||
|
||||
@@ -191,9 +191,7 @@ Test
|
||||
tf1.Draw (
|
||||
new Rect (new Point (0, 1), tf1Size),
|
||||
label.GetNormalColor (),
|
||||
label.ColorScheme.HotNormal,
|
||||
default (Rect),
|
||||
false
|
||||
label.ColorScheme.HotNormal
|
||||
);
|
||||
|
||||
tf2.Draw (new Rect (new Point (0, 2), tf2Size), label.GetNormalColor (), label.ColorScheme.HotNormal);
|
||||
@@ -215,9 +213,7 @@ This TextFormatter (tf2) with fill will be cleared on rewritten.
|
||||
tf1.Draw (
|
||||
new Rect (new Point (0, 1), tf1Size),
|
||||
label.GetNormalColor (),
|
||||
label.ColorScheme.HotNormal,
|
||||
default (Rect),
|
||||
false
|
||||
label.ColorScheme.HotNormal
|
||||
);
|
||||
|
||||
tf2.Text = "This TextFormatter (tf2) is rewritten.";
|
||||
|
||||
Reference in New Issue
Block a user