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

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


Hmm.... "BobsUI" uses a mix of layout policies and overrides through custom implementations of #extent: or #width: or #height:. Hmpf. Sometimes even in the same morph that actually uses such a policy. It also looks like that BobsUI fixes several layout bugs from 5.2 and before through subclassing. Unfortunately, one would have to go through all UI* classes and remove all those changes (or hacks).

I do not have the resources to do that now. :-( What needs to be done is to replace all hacks in #width: and #height: (etc.) with proper configuration of layout properties (i.e., #hResizing, #vResizing, ...)

The one thing you can easily fix is to replace all "#cellInset:" calls with "#cellGap:", which is explained in the Squeak 5.3 release notes.

Best,

Marcel
Am 19.01.2021 11:21:46 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Javier,

until then: Take a look at the 5.3 release notes under "compatibility notes".

Best,
Marcel
Am 19.01.2021 11:11:23 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
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. :-)

Best,
Marcel
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/70b6a2b5/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/70b6a2b5/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/70b6a2b5/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/70b6a2b5/attachment-0005.png>


More information about the Squeak-dev mailing list