Let the application control the menu further
ClosedPublic

Authored by apol on Sep 4 2016, 2:08 PM.

Details

Summary

Introduces a property so that triggering leaf categories doesn't change the
state of the menu.
Introduces a function so the application can reset the menu to its initial state

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.
apol updated this revision to Diff 6423.Sep 4 2016, 2:08 PM
apol retitled this revision from to Let the application control the menu further.
apol updated this object.
apol edited the test plan for this revision. (Show Details)
apol added reviewers: Kirigami, mart.
Restricted Application added a project: Kirigami. · View Herald TranscriptSep 4 2016, 2:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
colomar added a subscriber: colomar.Sep 4 2016, 7:51 PM

To provide some context:
Discover now switched to use the sidebar as a navigation menu, controlling which category of applications to show in the main window.
If clicking a menu item went back to the top level, the menu would not correspond to what's shown anymore.

The property is introduced because the default behavior for the menu global drawer / sidebar is still executing actions, in which case going back to the top menu afterwards makes sense.

mart added inline comments.Sep 4 2016, 7:53 PM
src/controls/GlobalDrawer.qml
184

resetMenuOnTriggered?
resetOnActionTriggered?

apol marked an inline comment as done.Sep 6 2016, 10:18 AM
apol updated this revision to Diff 6477.Sep 6 2016, 10:18 AM

Fix naming

mart requested changes to this revision.Sep 6 2016, 11:26 AM
mart edited edge metadata.

almost good to go

src/controls/GlobalDrawer.qml
369–370

you renamed the property to resetOnMenuTriggered, so this should be updated as well

This revision now requires changes to proceed.Sep 6 2016, 11:26 AM
apol updated this revision to Diff 6479.Sep 6 2016, 11:34 AM
apol edited edge metadata.

Ugh...

mart accepted this revision.Sep 6 2016, 11:35 AM
mart edited edge metadata.
This revision is now accepted and ready to land.Sep 6 2016, 11:35 AM
This revision was automatically updated to reflect the committed changes.