Skip to content
Verified Commit dd1fee31 authored by ivan tkachenko's avatar ivan tkachenko 🗯
Browse files

ContextDrawer: Clean up and port away from removed stuff

The contextualActions are gone from Kirigami.Page, and so should the
associated contextualActionsAboutToShow signal.

There were couple of expressions in this components which were checking
for applicationWindow in a wrong way.

That lengthy menu.model binding, thanks to modern QML & JS features is
now reduced to a one-liner filter expression wrapped in a top-level
method (note: not a property, so we don't have to store the list extra
time).

Private action-item delegate was ported to required property and a typed
Kirigami.Action kAction companion to shorten expressions.

The "go-up-symbolic" icon is gone, because is was pointlessly
overlapping with existing item's icon, and I couldn't find any
justification for it being there at all.

Test plan: can be tested on a modifier version of tests/actionsMenu.qml
file. Just add the following lines to it:

    contextDrawer: Kirigami.ContextDrawer {
        actions: pageStack.currentItem?.actions ?? []
        enabled: true
    }

    pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Titles
parent d294f90e
Pipeline #496980 passed with stage
in 3 minutes and 21 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment