Bug 520337 - GlobalDrawer topContent items are only top-aligned if the rest of the view fills up with stuff
Summary: GlobalDrawer topContent items are only top-aligned if the rest of the view fi...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.26.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-18 11:47 UTC by John Veness
Modified: 2026-05-20 16:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.27
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Veness 2026-05-18 11:47:01 UTC
DESCRIPTION
When starting Discover, especially noticeable on a slow system, initially the Home/Installed/Updates/Settings/About items (the "topContent" in the QML) are not aligned to the top of the drawer. Instead, they are vertically centered. When the categories appear, they are pushed to the top, which is OK, but it would look slicker if the top content was already at the top before the categories appear.

STEPS TO REPRODUCE
1. Run Discover, especially while your system is busy (e.g. have Discover in a saved Plasma session which is being restored)
2. Look at the left-hand drawer

OBSERVED RESULT
Notice that Home/Installed/Updates/Settings/About are vertically centered briefly, until the categories appear below them, pushing them to the top.

EXPECTED RESULT
Home/Installed/Updates/Settings/About are aligned to the top of the drawer (under the Search bar) immediately, so that when the categories appear, they don't have to move.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20260516
KDE Plasma Version: 6.6.5
KDE Frameworks Version: 6.26.0
Qt Version: 6.11.0
Kernel Version: 7.0.7-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
As an alternative step to reproduce, run "plasma-discover --backends none" which will show the vertical centering when no categories are present.

I expect the issue is somewhere in https://invent.kde.org/plasma/discover/-/blob/master/discover/qml/DiscoverDrawer.qml?ref_type=heads but I don't know enough about QML to fix.
Comment 1 Nate Graham 2026-05-18 22:16:18 UTC
I suspect this is actually in Kirigami, not Discover. I'll see if I can fix it.
Comment 2 Nate Graham 2026-05-18 22:19:38 UTC
Yep, found it and fixed it. Merge request incoming.
Comment 3 Bug Janitor Service 2026-05-18 22:23:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/2101
Comment 4 Nate Graham 2026-05-20 16:56:33 UTC
Git commit 5a2f18bc929cb068b51d6ab9202dbfd60203bd71 by Nate Graham.
Committed on 20/05/2026 at 16:51.
Pushed by ngraham into branch 'master'.

GlobalDrawer: top-align topContent

You would expect this to happen based on the name, but it only happens
if the rest of the view fills up with stuff and pushes up the topContent
items.

Manually top-align them so they're always located in the right place.
FIXED-IN: 6.27

M  +1    -1    src/controls/GlobalDrawer.qml

https://invent.kde.org/frameworks/kirigami/-/commit/5a2f18bc929cb068b51d6ab9202dbfd60203bd71