Skip to content

kcm: Set dialog contents in DurationPromptDialog as documented

Jakob Petsovits requested to merge work/jpetso/kcm-dialog-no-contentitem into master

Kirigami wants the content item(s) in a Dialog to be listed as (default) child item, rather than replacing its internal contentItem which is a ScrollView with extensive sizing logic.

Provide preferredWidth to get a minimum width while also growing the component when a long label is used. Furthermore, this will guarantee header and footer being fully visible.

A binding loop warning disappears with this commit.

Taking out the contentItem: in this KCM context made the dialog disappear, which was a bug in Kirigami that can be worked around for now by setting the visual parent of the DurationPromptDialog from main.qml. Hopefully this one-liner can be removed again soon.


Bonus commit: Remove the close button from DurationPromptDialog

We already have a Cancel button, the close button is visually distracting for such a small dialog and doesn't really add anything.

Merge request reports