|
@@ -2065,7 +2065,8 @@ namespace Terminal.Gui.Core {
|
|
}
|
|
}
|
|
var label = new Label (breakLines) {
|
|
var label = new Label (breakLines) {
|
|
TextDirection = TextDirection.TopBottom_LeftRight,
|
|
TextDirection = TextDirection.TopBottom_LeftRight,
|
|
- Width = Dim.Fill (), Height = Dim.Fill ()
|
|
|
|
|
|
+ Width = Dim.Fill (),
|
|
|
|
+ Height = Dim.Fill ()
|
|
};
|
|
};
|
|
var frame = new FrameView () { Width = Dim.Fill (), Height = Dim.Fill () };
|
|
var frame = new FrameView () { Width = Dim.Fill (), Height = Dim.Fill () };
|
|
|
|
|
|
@@ -3153,7 +3154,7 @@ e
|
|
[Fact]
|
|
[Fact]
|
|
public void GetSumMaxCharWidth_List_Simple_And_Wide_Runes ()
|
|
public void GetSumMaxCharWidth_List_Simple_And_Wide_Runes ()
|
|
{
|
|
{
|
|
- List<ustring> text =new List<ustring>() { "Hello", "World" };
|
|
|
|
|
|
+ List<ustring> text = new List<ustring> () { "Hello", "World" };
|
|
Assert.Equal (2, TextFormatter.GetSumMaxCharWidth (text));
|
|
Assert.Equal (2, TextFormatter.GetSumMaxCharWidth (text));
|
|
Assert.Equal (1, TextFormatter.GetSumMaxCharWidth (text, 1, 1));
|
|
Assert.Equal (1, TextFormatter.GetSumMaxCharWidth (text, 1, 1));
|
|
text = new List<ustring> () { "こんにちは", "世界" };
|
|
text = new List<ustring> () { "こんにちは", "世界" };
|
|
@@ -3177,6 +3178,8 @@ e
|
|
Assert.Equal (6, TextFormatter.GetMaxLengthForWidth (runes, 6));
|
|
Assert.Equal (6, TextFormatter.GetMaxLengthForWidth (runes, 6));
|
|
runes = ustring.Make ("こんにちは 世界").ToRuneList ();
|
|
runes = ustring.Make ("こんにちは 世界").ToRuneList ();
|
|
Assert.Equal (3, TextFormatter.GetMaxLengthForWidth (runes, 6));
|
|
Assert.Equal (3, TextFormatter.GetMaxLengthForWidth (runes, 6));
|
|
|
|
+ runes = ustring.Make ("[ Say Hello 你 ]").ToRuneList ();
|
|
|
|
+ Assert.Equal (15, TextFormatter.GetMaxLengthForWidth (runes, 16));
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|