Refactor the Global ToolBar concept

Authored by mart on Jun 26 2018, 2:20 PM.

Description

Refactor the Global ToolBar concept

Summary:
The recomended toolbar to be used for kirigami applications used to need to be explicitly instantiated, and had an internal flickable that tried hard to be synchronized with the main PageRow.
but this is pretty much impossible to have it glitch-free, it will there always be an edge case in which the two flickables gets out of sync, which is a strong sign of bad architecture.

Page toolbars are now moved on top of Page itself, so on the same Flickable as the PageRow itself. (a global header is still used when we are in breadcrumbs mode)
Is now also now possible to have multiple instances of PageRows, each one with its own globalToolBar. So, it's now also possible for AbstractApplicationHeader (and any subclass) to trach a different PageRow than the global one in ApplicationWindow.

also, there have been requests to be possible while keeping the default toolbar, have a custom global one that goes on top of it (ApplicationWindow's header item)

also, i wanted to have a way to make it possible to switch on the fly between a mobile-like and a desktop-like toolbar for further convergence plans

in the future, it will be possible for pages to put their own component to replace the default toolbar

CCBUG: 395455

Test Plan:
tested all possible combinations of both the new way and the legacy compatibility mode.

ApplicationHeader and ToolBarApplicationHeader still work if used explicitly.

The patch shouldn't have significant visible UI changes.

there is still an explicit FIXME tough i want to do it in a different turn, as would need a new component

Reviewers: Kirigami, ngraham

Reviewed By: Kirigami, ngraham

Subscribers: apol, IlyaBizyaev, ngraham, davidedmundson, plasma-devel

Tags: Kirigami

Differential Revision: https://phabricator.kde.org/D13663

Details

Committed
martJun 26 2018, 4:33 PM
Reviewer
Kirigami
Differential Revision
D13663: Refactor the Global ToolBar concept
Parents
R169:27fb2591c54b: Handle enabled property of simple models
Branches
Unknown
Tags
Unknown