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

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jan 25 15:31:10 UTC 2021


Hi Javier.

I backported that #shrinkWrap fix to 5.3. Maybe this helps a little bit. Still, UISimpleGroupBoxMorph should really have its own table layout. :-)

Best,
Marcel
Am 25.01.2021 13:41:52 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Javier.

Since UISimpleGroupBoxMorph manages the layout of label and contents, it needs a TableLayoutPolicy. Then it works as expected:



Still, I wonder why #adjustLayoutBounds does not wrap around the misaligned submorphs when not having that layout:



At least, I would expect this:


Hmmm.....

Best,
Marcel
Am 25.01.2021 12:46:14 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
> You are blaming indeterminate hacks in BobosUi for the problems

Sorry. I was just saying, that BobsUI subclassed almost all UI classes in Morphic and made changes that override many things in the base system. For this, of course, it assumes a certain behavior (or misbhevior) in the base system. Consequently, compatibility issues could arise anywhere. :-/

>who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

Reverting this method produces many bugs. 5 tests in TableLayout fail, for example.

> So I think this is a "clean" bug created for the changes in the table layout in 5.3.

Thank you, for reproducing the behavior. I will take a look at it.

Best,
Marcel
Am 22.01.2021 18:16:29 schrieb Javier Diaz-Reinoso via Squeak-dev <squeak-dev at lists.squeakfoundation.org>:

On 19 Jan 2021, at 06:50, Marcel Taeumel <marcel.taeumel at hpi.de [mailto:marcel.taeumel at hpi.de]> wrote:

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

[... cut ...]

You are blaming indeterminate hacks in BobosUi for the problems, al least for the UIGroupBoxMorph problem that is not correct. I now extracted that morph from BobsUi to  UISimpleGroupBoxMorph [http://UISimpleGroupBoxMorph.st] removing all instances and selectors who are not involves in the initialization, also recreated by hand the tree of morphsusing only regular morphs, this is in the workspace 'test UISimpleGroupBox.text', the result of evaluating is:


who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

As for the other problems with the UITitleBarMorph and the extra spaces, I think is also produced by bugs in the same area, after all BobsUI are not changing that area.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210125/a460a18a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 5257 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210125/a460a18a/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3932 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210125/a460a18a/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3902 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210125/a460a18a/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-01-22 at 11.48.06.png
Type: image/png
Size: 11302 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210125/a460a18a/attachment-0007.png>


More information about the Squeak-dev mailing list