[squeak-dev] Problems with table layout in 5.x

Marcel Taeumel marcel.taeumel at hpi.de
Tue Jan 19 10:11:23 UTC 2021

Hi Javier,

this is most likely a configuration issue and thus easy to fix in your code. I will take a look at BobsUI/BobsUI-jdr.7.mcz and "ExampleRolodex open".

In 5.3, we added tests for TableLayout and fixed several bugs. Yet, some "unexpected behavior" might have changed, which client code maybe relied on until now -- to be addressed in that client code. But maybe there are more bugs to fix and tests to write. :-)

Am 18.01.2021 22:29:00 schrieb Javier Diaz-Reinoso via Squeak-dev <squeak-dev at lists.squeakfoundation.org>:
After finish all the features for version 1.0.0  in my port of Pronterface in squeak 4.5:
https://sourceforge.net/p/sqpronterface/mercurial/ [https://sourceforge.net/p/sqpronterface/mercurial/]

I am trying to test in squeak 5.3 but I encounter problems with BobsUI who is the framework I am using.

BobsUI use a lot of nested UIAlignmentMorphs and the layout of that is mostly OK, but the problem appears in a UIGroupBoxMorph, in this morph the top submorph are only two: a label (UIStringMorph) and a container (UIMorph) who have the submorphs of the widgets of the group, this image show the problem between squeak 4.5 and 5.3, this is using the basic example of BobsUi called ExampleRolodex:
Tracing the execution of the creation of the morphs I find the problem in Morph>>adjustLayoutBounds reverting the version "mt 8/22/2019" to "ar 11/12/2000" restore the view (mostly) to the version 5.2.

>From the tracing I see changes in the order of the selectors who are used to evaluate the size of the tree of submorphs; appears to be that the old version (4.5) always wait to obtain the size of the "leaves" of the tree of submorphs before updating the top submorphs, I think the actual version fix some sizes prematurely.

This is also apparent in other problem who is present in 5.2 and 5.3 but not in 4.5, 5.1, this image show the top of the UIWindowMorph (4.5 and 5.2):

appears the title (UITitleBarMorph) size is fixed before the (last) UIGroupBoxMorph of the window is evaluated.

Also in 5.3 (not in 5.2 and before) there is a lot of extra space around the widgets, the UIWindowMorph size are:
4.5 429 × 337 pixels
5,1 438 × 363 pixels, appears to be a change of fonts in the system
5.2 428 × 333 pixels
5.3 500 × 479 pixels

this is worse in the title of 5.3 because the extra space move te title down the proper position:

Finally I find the bounds and fullBound of the submorphs in 5.x are absolute where in 4.5 was relative to the window, in my probable naive opinion, I think is a lot of updates when a window move versus a single update to the top morph, for example ExampleRolodex have 77 submorphs, sqPronterface have 158.

For reproducing the results, you can copy BobsUI/BobsUI-jdr.7.mcz (177KB) from the repository and create the window with:

ExampleRolodex open

beware that BobsUI, intentionally, suppress the halos, so you need to use Crtl-click or equivalent to inspect it, delete, ....

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210119/26aa3037/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-01-12 at 16.33.58.png
Type: image/png
Size: 44548 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210119/26aa3037/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-01-12 at 16.55.45.png
Type: image/png
Size: 57146 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210119/26aa3037/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-01-12 at 17.59.38.png
Type: image/png
Size: 24971 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210119/26aa3037/attachment-0005.png>

More information about the Squeak-dev mailing list