make handle follow arbitrary height of the drawer
ClosedPublic

Authored by camiloh on Jul 22 2019, 2:01 PM.

Details

Summary

If the height of the drawer is set to a different value from the applicationWindow height, then the drawer handle is placed at the bottom of the drawer, following the new arbitrary height value.

with height property unset:

with the height property set to an arbitrary value:

use case:
when there is a Page with a footer and it is not inside the pageStack, the handle drawer covers the footer, by setting now the drawer height to application window height minus the height of the footers the content is now not overlapping. This allows placing the drawer and handle more freely.

before:

after:

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
camiloh created this revision.Jul 22 2019, 2:01 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptJul 22 2019, 2:01 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
camiloh requested review of this revision.Jul 22 2019, 2:01 PM
camiloh edited the summary of this revision. (Show Details)Jul 22 2019, 2:12 PM
camiloh added a reviewer: Kirigami.
camiloh edited the summary of this revision. (Show Details)
camiloh edited the summary of this revision. (Show Details)
camiloh edited the summary of this revision. (Show Details)Jul 22 2019, 2:15 PM
camiloh edited the summary of this revision. (Show Details)
camiloh updated this revision to Diff 62309.Jul 22 2019, 3:10 PM

take into consideration the y position

Summary: if the drawer height prop has been set to a custom value, might as well the y position too, so take it into account to position the handle

mart added inline comments.Jul 22 2019, 5:01 PM
src/controls/templates/OverlayDrawer.qml
210

applicationWindow() should be replaceable with root.parent, and that makes it work also when not in a kirigami applicationwindow

camiloh updated this revision to Diff 62345.Jul 22 2019, 7:07 PM

now using root.parent instead of applicationWindow()

mart accepted this revision.Jul 25 2019, 11:36 AM
This revision is now accepted and ready to land.Jul 25 2019, 11:36 AM
This revision was automatically updated to reflect the committed changes.