Terminal.Gui: Dim.Percent() generating incorrect Width

The code below produces this result. The right hand TextField does not have a width of 40%

image

Application.Init();

var win = new Window("Test") { X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill() };

var textLeft = new TextField("Left") { X = 0, Y = 0, Width = Dim.Percent(40) };
var textRight = new TextField("Right") { X = Pos.Right(textLeft)+1,  Width = Dim.Percent(40) };
win.Add(textLeft, textRight);

Application.Top.Add(win);
Application.Run ();

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for the explanation BDisp! I did notice it, and I could swear I put a comment somewhere, but not here.

Thank you!

I’ve sensed something wrong here too, but wasn’t sure. Thanks for getting a good repro!