Fix inconsistent timeline page titles
This supersedes !119 (closed) as a proper fix to the issue.
Explanation
This took a while to hunt down, but the fix is actually dead simple. Basically, Kirigami allows us to set custom title delegates, which we use to allow rich text in headers - for display names with emojis and so on. However, Kirigami.Page
inherits Page
which has it's own title
property. This is still used in Kirigami internally to do some margin calculations:
leftPadding: pageRow ? (Math.min(Qt.application.layoutDirection === Qt.LeftToRight
? Math.max(page.title.length > 0 ? pageRow.globalToolBar.titleLeftPadding : 0, pageRow.Kirigami.ScenePosition.x - page.Kirigami.ScenePosition.x + pageRow.globalToolBar.leftReservedSpace + Kirigami.Units.smallSpacing)
: Math.max(page.title.length > 0 ? pageRow.globalToolBar.titleLeftPadding : 0, -pageRow.width + pageRow.Kirigami.ScenePosition.x + page.Kirigami.ScenePosition.x + page.width + pageRow.globalToolBar.leftReservedSpace),
width/2))
: Kirigami.Units.smallSpacing
There's no reason to not set this property (and we probably should have been doing it since the start) so now it's set so Kirigami is happy to calculate correct margins again!