Skip to content

Dialog: Fix padding when resizing

Bart De Vries requested to merge work/dialog-padding-fix into master

This fixes the placement and padding of the mainItem when padding of that mainItem is explicitly set to a non-zero value and the dialog width is less than the implicit width.

@devinlin

Here's an example of a Dialog in Kasts; this is the regular view:

Screenshot_20220106_114055

However, when you resize, the TextField and Label text above don't rescale nicely to the Dialog width:

Screenshot_20220106_114117

This is the same resized Dialog, but now with this patch:

Screenshot_20220127_202647

The patch consists of having Kirigami.Dialog take the root.leftPadding and root.rightPadding into account for calculatedMaximumWidth of the contentItem.

Merge request reports