Bug 432541

Summary: Kirigami.Page needs to be in a row or a stack to get the header to show up
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Nate Graham <nate>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.78.0   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nate Graham 2021-02-05 15:10:29 UTC
active: (row || stack) && (root.titleDelegate !== defaultTitleDelegate || root.globalToolBarStyle === Kirigami.ApplicationHeaderStyle.ToolBar || root.globalToolBarStyle === Kirigami.ApplicationHeaderStyle.Titles)

Seems a bit odd to me. I'm porting Elisa to be more Kirigami-ish and finding that this is an impediment, because my Page instances aren't displaying headers automatically.
Comment 1 Nate Graham 2021-02-05 15:20:28 UTC
If we do change this, it will probably need to be done very carefully and in conjunction with other changes, or else various pages that expect no header will suddenly have one, and if they are already making their own header, the result will be double headers. This will be very visible in System Settings for example.

Possibly a KF6 topic, as a result.
Comment 2 Marco Martin 2021-02-24 18:04:17 UTC
I'm trying to do that in a branch now, we can test it on some apps
Comment 3 Marco Martin 2021-02-25 11:02:08 UTC
https://invent.kde.org/frameworks/kirigami/-/merge_requests/243 adresses this, but one has to enable the toolbar explicitly, so it shuldn't cause unwantedtoolbars pop up in existing apps
Comment 4 Marco Martin 2021-03-02 13:32:58 UTC
Git commit adebba51de7d5a9483061fed2d7ce588b9a30a0a by Marco Martin.
Committed on 02/03/2021 at 13:32.
Pushed by mart into branch 'master'.

Support for Toolbars in standalone pages

Make the automatic toolbar laoder work also when is not loaded inside
a PageRow (or pagerow's layers).
By default it won't display anything, so should be perfectly
retrocompatible, in order for it to load the toolbar, it
needs
globalToolBarStyle: Kirigami.ApplicationHeaderStyle.ToolBar
declared in the page itself

M  +21   -3    src/controls/Page.qml
M  +13   -11   src/controls/private/globaltoolbar/AbstractPageHeader.qml
M  +2    -2    src/controls/private/globaltoolbar/ToolBarPageHeader.qml

https://invent.kde.org/frameworks/kirigami/commit/adebba51de7d5a9483061fed2d7ce588b9a30a0a