`Dim.Auto (DimAutoStyle.Text)` confuses `TextFormatter` when `Width` is absoulte and `Height` is auto
tig opened this issue · comments
Tig commented
- Change
CheckBox
's constructor to setHeight = Dim.Auto (DimAutoStyle.Text)
- Checkbox unit tests fail when they shouldn't
This test sets Width to an absolute.
var checkBox = new CheckBox
{
X = 1,
Y = Pos.Center (),
Text = "Check this out 你",
TextAlignment = Alignment.Centered,
Width = 25
};
For some reason, this is confusing TextFormatter.
Tig commented
BDisp commented
The root of the issue is
TextFormatter.AutoSize
applies to both width & height. LikeView
, it needs to treat them independently.
It only consider the text direction for the AutoSize
.