Skip to content

Fix popup dialogs and other stuff

ivan tkachenko requested to merge work/ratijas/popup-stikes-again into master

Replaces !312 (closed)

DownloadItemsSheet: Wrap the file names of entries instead of eliding

We are not short on space here, and not having any other means to read the whole string (like tooltips on hover) is kinda hostile toward user.

DownloadItemsSheet: Port from OverlaySheet to Kirigami.Dialog for file selection dialog

OverlaySheet acts weird when it's opened inside a ScrollView.

Dialog just opens on top of the view like OverlaySheet, without the issues, while looking mostly similar.

Don't show close button anymore. There's already a standard QQC2.Dialog.Close button provided by the Dialog type now.

Note from ratijas: Unlike the super-magical OverlaySheet, the Dialog needs clip: true to be set on the ListView, otherwise the content will be visible out of bounds when scrolled away.

Explicitly set QQC2.Overlay.overlay as a parent for popups

Because that's how popups work in QtQuick.Controls. And that's what goes wrong in Kirigami with its "implicit" bindings directly inside Dialog and OverlaySheet types. Because QQC2.Overlay.overlay has to be queried on a real Item which already belongs to some window; if you query it on a Popup itself you'd get a null overlay, but the Popup are usually declared as child objects of some other Item in which case said Item would become not only QObject::parent but also a visual Item parent of a Popup, thus accidentally making QQC2.Overlay.overlay work -- only to immediately reassign parent Item to an overlay itself. This sounds like a rather unintentional loophole rather than a well-thought architectural design, so let's avoid that pattern, and just bind a parent normally.

QuestionAsker: Remove broken sizing bindings

They were completely backwards: calculating implicit size form an explicit one, and referencing some non-existing view id. The implicit size provided by a QQC2 style implementation should be good enough, and the ColumnLayout's content has some limits on maximum width.

Also, center in parent because a dialog can not meaningfully refer to a QQC2.Overlay attached property from within itself.

Fix the "Use" label on certain delegates

This is an omission from porting in e895e8c7

Edited by ivan tkachenko

Merge request reports