Bug 396877 - Toolbar Headers are mis-aligned on several Discover pages
Summary: Toolbar Headers are mis-aligned on several Discover pages
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.48.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
: 396861 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-26 13:08 UTC by Nate Graham
Modified: 2018-07-26 15:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Mis-aligned header (2.22 MB, video/webm)
2018-07-26 13:08 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-07-26 13:08:02 UTC
Created attachment 114144 [details]
Mis-aligned header

+++ This bug was initially created as a clone of Bug #396861 +++

With everything from git master.

See attached screen recording: the Update page's header is centered until the window is resized, at which point it becomes correctly left-aligned. When centered, it undesirably makes the toolbar buttons lose their text labels.
Comment 1 Aleix Pol 2018-07-26 13:13:12 UTC
Correct, can reproduce, discussed it with Marco last time we met, it's an issue in kirigami.
Comment 2 Nate Graham 2018-07-26 13:18:00 UTC
*** Bug 396861 has been marked as a duplicate of this bug. ***
Comment 3 Marco Martin 2018-07-26 15:24:12 UTC
Git commit 9a261bff2e518c734a24f0673c2e048987be3f25 by Marco Martin.
Committed on 26/07/2018 at 15:23.
Pushed by mart into branch 'master'.

add ScenePosition element

it's an attached property which allows to acess the scene
position of its item, it's tracking it and can be binded to

this should solve some positioning issues

M  +1    -0    src/CMakeLists.txt
M  +8    -6    src/controls/private/AbstractPageHeader.qml
M  +3    -2    src/controls/private/PageRowGlobalToolBarUI.qml
M  +3    -6    src/controls/templates/OverlayDrawer.qml
M  +2    -0    src/kirigamiplugin.cpp
A  +79   -0    src/scenepositionattached.cpp     [License: LGPL (v2+)]
A  +76   -0    src/scenepositionattached.h     [License: LGPL (v2+)]

https://commits.kde.org/kirigami/9a261bff2e518c734a24f0673c2e048987be3f25
Comment 4 Nate Graham 2018-07-26 15:32:55 UTC
That commit made things much worse, I'm afraid. Now none of Discover's toolbars have header text when the window is somewhat narrow, and the toolbar buttons are never positioned properly.

Can you test with Discover (especially the Settings and Updates pages) before pushing the next fix? Thanks!