Bug 404203 - Add option to horizontally center the action buttons for the desktop-style toolbar
Summary: Add option to horizontally center the action buttons for the desktop-style to...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks: 402948
  Show dependency treegraph
 
Reported: 2019-02-11 14:12 UTC by Nate Graham
Modified: 2019-09-16 14:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.63


Attachments
Right-aligned toolbar buttons look kind of ugly in this UI (427.88 KB, image/png)
2019-03-04 16:36 UTC, Nate Graham
Details
Not lickable (648.32 KB, image/png)
2019-08-14 19:57 UTC, Nate Graham
Details
Lickable (704.45 KB, image/png)
2019-08-14 19:58 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-02-11 14:12:29 UTC
The mobile version of the toolbar-with-actions paradigm has them horizontally centered, with the primary action in the center. It would be nice if you could optionally use the same horizontally centered style with the desktop-style toolbar too.

This would probably necessitate not showing the title (if there was one), but since it would be optional, you would only use this style when having the controls front-and-center was much more important than showing a title.
Comment 1 Marco Martin 2019-03-04 16:28:00 UTC
-1
Comment 2 Marco Martin 2019-03-04 16:30:10 UTC
never seen a desktop toolbar which has just few buttons in the exact middle. however, a weird thing like that if one really wants can be completely custom implemented,
disabling the toobat completely for that page then implement such a toolbar as header: of that page.

i would strongly discourage such a thing regardless
Comment 3 Nate Graham 2019-03-04 16:36:11 UTC
Created attachment 118540 [details]
Right-aligned toolbar buttons look kind of ugly in this UI

The specific use case I have in mind is Kamoso, where we actually *want* a centered button style. Currently we achieve this by forcing the use of the mobile UI even on desktop, which seems wrong and against the spirit of Kirigami. However if we remove the hack and allow the use of the desktop-style top toolbar on the desktop, the actions are all right-aligned and frankly it just doesn't look good. See the attachment.

I suppose we could implement this ourselves in Kamoso, but it would be nicer to have support in the toolkit, ya know?
Comment 4 Nate Graham 2019-08-14 19:57:53 UTC
Created attachment 122123 [details]
Not lickable

Let me give you a sense of what I'm trying to accomplish. Here's the current appearance of Kamoso when it's using a non-mobile toolbar. Notice now the actions all pile together on the right, making the presentation feel very right-heavy.
Comment 5 Nate Graham 2019-08-14 19:58:37 UTC
Created attachment 122124 [details]
Lickable

And here's what it would be like with the requested feature. It looks, I daresay... lickable. :)
Comment 6 Nate Graham 2019-09-16 14:38:55 UTC
Git commit 872cfbcbd7cf1ec52df69434b3f93b4a72bd5d45 by Nate Graham.
Committed on 16/09/2019 at 14:38.
Pushed by ngraham into branch 'master'.

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

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.
Related: bug 402948
FIXED-IN: 5.63

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

Before: {F7338499}

After: {F7338498}

Reviewers: #kirigami, #vdg, mart, ndavis

Reviewed By: #kirigami, #vdg, mart, ndavis

Subscribers: plasma-devel

Tags: #kirigami

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

M  +1    -0    src/controls/PageRow.qml
M  +1    -0    src/controls/private/globaltoolbar/PageRowGlobalToolBarStyleGroup.qml
M  +11   -2    src/controls/private/globaltoolbar/ToolBarPageHeader.qml

https://commits.kde.org/kirigami/872cfbcbd7cf1ec52df69434b3f93b4a72bd5d45