ahiemstra created this revision. ahiemstra added a reviewer: Kirigami. Herald added a project: Kirigami. Herald added a subscriber: plasma-devel. ahiemstra requested review of this revision.
REVISION SUMMARY This replaces the custom layouting code in ToolBarPageHeader with an ActionToolBar, which allows items from a page's contextualActions to flow onto the page toolbar when there is space available. One major change is that this adds support for alignment to ActionToolBar, which effectively rewrites the layouting code for it. Rather than use inline hidden actions, the new code uses a separate hidden layout to determine action visibility. Still to do (maybe in a followup patch?): - Add a priority property to Action that matches QAction's priority property. - Use the priority to determine if a certain action should be shown in the toolbar at all or always kept in overflow. - Use the priority to to replicate the icon only display behaviour used for main/left/right actions. - Find some way for actions to indicate whether to show text at all. TEST PLAN Running kirigami2gallery everything should still work correctly, with the addition of the mentioned action overflow. REPOSITORY R169 Kirigami BRANCH contextactions_in_toolbar REVISION DETAIL https://phabricator.kde.org/D24634 AFFECTED FILES src/controls/ActionToolBar.qml src/controls/private/globaltoolbar/ToolBarPageHeader.qml To: ahiemstra, #kirigami Cc: plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson, mart, hein