Skip to content

[DialogButtonBox] Improve implicit size behavior

Noah Davis requested to merge work/ndavis/dialogbuttonbox-sizing into master

The new behavior should match the behavior of most Container based QQC2 components.

contentWidth and contentHeight are now used to calculate implicit size.

Implicit background size is now used as part of the implicit size calculation, like most QQC2 components.

The code for fitting buttons is also slightly cleaner and more accurate, using availableWidth and only subtracting the spacing between buttons.

contentWidth and contentHeight are equivalent to implicitContentWidth and implicitContentHeight by default for Container and subclasses of Container such as DialogButtonBox. This also allows it to match the previous behavior, so nothing should break, but it should be easier to use DialogButtonBox by following Qt documentation.

Edited by Noah Davis

Merge request reports