Comment 2 for bug 1628161

Revision history for this message
Andrea Bernabei (faenil) wrote :

Here is a report of my investigation and my chat with Marco this afternoon:

The problem is topChanged and bottomChanged are connected to _q_relayout().
The relayout function does the relayout of the element, it doesn't update the height of the layout.

They should instead trigger _q_updateSize(), that will call _q_relayout() after updating the size.

There were already functionality and unit tests in place that ensure that the height is updated whenever the slot-specific paddings change.

There was a test checking that having the "global" top/bottom padding *initialized* to a *custom* value would produce a layout with the correct height, but there was no test checking that *changing
* the global padding *after* initialization would update the layout height.

Well spotted, and sorry for the inconvenience, Marco!

Thanks a ton for the fix and the unit test! :)