Fix the KNSQuick Dialog's close title and basic layout
ClosedPublic

Authored by leinir on Feb 7 2020, 10:29 AM.

Details

Summary

This resolves several issues found in the KNSQuick Dialog component.

Specifically it puts a background in the dialog (as a rectangle),
since the QtQuick Dialogs base dialog lacks such a thing by default,
and offers no background property to rectify it.

It further changes the Close button from a custom one to using a
default button provided by the various underlying systems. This
is more fault proof than the previous incarnation, but requires
that the escape button press is handled separately.

Finally it sets a sensible default size (previously the dialog
was made large by the layout, but as a side effect of the layouting
now being done without a Layout (which we could, but which would make
the code enormously convoluted for little gain), we can now set a
set of implicit width and height on the content item, which results
in both a sensible default size and a dialogue that will resize down
the way one would expect it to).

This could have been done as separate patches, but they're too
intertwined for that to feel in any way reasonable to do...

BUG:415606
BUG:416354
BUG:414682

Test Plan

The dialog with its new default size looks as follows:

Diff Detail

Repository
R304 KNewStuff
Branch
fix-dialog-background-and-button (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22164
Build 22182: arc lint + arc unit
leinir created this revision.Feb 7 2020, 10:29 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 7 2020, 10:29 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Feb 7 2020, 10:29 AM
leinir edited the test plan for this revision. (Show Details)Feb 7 2020, 10:31 AM
leinir added reviewers: Frameworks, ngraham.
ngraham accepted this revision.Feb 7 2020, 1:51 PM

LGTM and fixes all the bugs! Thanks.

If it lands quickly, I wonder if it would be worth it to try and squeeze this into Frameworks 5.67 so all the people using this dialog in Plasma 5.18 see the polished-up version from the start.

This revision is now accepted and ready to land.Feb 7 2020, 1:51 PM
leinir added a comment.Feb 7 2020, 1:52 PM

LGTM and fixes all the bugs! Thanks.

Thanks! :D

If it lands quickly, I wonder if it would be worth it to try and squeeze this into Frameworks 5.67 so all the people using this dialog in Plasma 5.18 see the polished-up version from the start.

i was hoping the same - definitely would be worth it :)
This revision was automatically updated to reflect the committed changes.