Add a mode to center actions and omit the title when using a ToolBar style
AcceptedPublic

Authored by ngraham on Tue, Sep 10, 7:09 PM.

Details

Reviewers
mart
ndavis
Group Reviewers
Kirigami
VDG
Summary

This patch implements an optional and off-by-default feature to center the actions and
omit the title when displaying the ToolBar style. This is useful for simple desktop apps
that don't need to display a title in the toolbar, where centered toolbuttons look
better than right-aligned toolbuttons.

FEATURE: 404203
CCBUG: 402948
FIXED-IN: 5.63

Test Plan

Apply this patch to Kirigami then run Kamoso after applying D23847.

Before:

After:

Diff Detail

Repository
R169 Kirigami
Branch
optional-centered-actions-with-no-title (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16392
Build 16410: arc lint + arc unit
ngraham created this revision.Tue, Sep 10, 7:09 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptTue, Sep 10, 7:09 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Tue, Sep 10, 7:09 PM
ndavis accepted this revision.Tue, Sep 10, 7:22 PM
This revision is now accepted and ready to land.Tue, Sep 10, 7:22 PM
ngraham edited the test plan for this revision. (Show Details)Tue, Sep 10, 7:24 PM
mart added a comment.Wed, Sep 11, 3:49 PM

Like the concept, API may need a bit of improvement

src/controls/PageRow.qml
146

This name for property is a bit... Meh
I would export a qt.alignment property *and* the icon position enum

src/controls/private/globaltoolbar/ToolBarPageHeader.qml
72

Perhaps a state machine with AnchorChange may make it a bit better and reliable

ngraham updated this revision to Diff 65864.Wed, Sep 11, 5:25 PM
ngraham marked 2 inline comments as done.

Make it better

Thanks, hopefully this is better. Now there's a Qt.Alignment property. Not sure what you mean about the icon position enum though. Would appreciate clarification.

ngraham updated this revision to Diff 65866.Wed, Sep 11, 5:27 PM

Fix typo