Skip to content

ToolBarLayout: Fix height calculations

Arjen Hiemstra requested to merge work/ahiemstra/actiontoolbarimplicit into master

toolbarlayout: Use delegate's implicitHeight for calculating layout's maxHeight

maxHeight is used to set the layout's implicit height, so shouldn't be using the delegate's height property as that leads to issues. Moreover we actually potentially manipulate the delegate's height, which means there is even a risk for infinite layout loops.


toolbarlayout: Use maxHeight when filling delegate's heights

Rather than blindly assuming the toolbar's height can be used, use the calculated maxHeight which already accounts for toolbar height if it set.


ToolBarLayout: Split up implicit size calculation and layouting

If an explicit height is set, we need to make sure to use it for delegate's height. Unfortunately, Control unconditionally sets the contentItem's height, which makes QQuickItem::heightValid() rather useless. By separating the layouting from the size calculation, we can have the layouting make use of the width/height of the item rather than relying on previously calculated values, making it always use the right value.

BUG: 464910

This is an alternative to !955 (closed)

Edited by Arjen Hiemstra

Merge request reports

Loading