Bug 479737 - With Qt 6.7, "Still looking..." spinner is not horizontally centered
Summary: With Qt 6.7, "Still looking..." spinner is not horizontally centered
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 5.92.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-13 14:00 UTC by Patrick Silva
Modified: 2024-01-18 13:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (76.57 KB, image/png)
2024-01-13 14:00 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2024-01-13 14:00:46 UTC
Created attachment 164863 [details]
screenshot

STEPS TO REPRODUCE
1. open Discover
2. click on "All applications" in the sidebar
3. 

OBSERVED RESULT
"Still looking" spinner in the left side, as seen in the attached screenshot. The spinner is horizontally centered on neon unstable.

EXPECTED RESULT
"Still looking" spinner is horizontally centered, like on neon unstable.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.7.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-01-16 23:04:45 UTC
Cannot reproduce with Qt 6.6; maybe a Qt 6.7 regression.
Comment 2 Nicolas Fella 2024-01-17 22:59:29 UTC
It's a change in Qt 6.7

Minimal example code

import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.kirigami as Kirigami

Kirigami.ScrollablePage {
    ListView {
        footer: ColumnLayout {
            anchors.horizontalCenter: parent.horizontalCenter
            QQC2.BusyIndicator {
                running: parent.visible
                Layout.alignment: Qt.AlignCenter
                Layout.preferredWidth: 40
                Layout.preferredHeight: 40
            }
        }
    }
}

It prints
> QML ColumnLayout: Possible anchor loop detected on horizontal anchor.

which reminds me of https://bugreports.qt.io/browse/QTBUG-120197, and indeed our code is similarly questionable
Comment 3 Bug Janitor Service 2024-01-17 23:22:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/733
Comment 4 Nicolas Fella 2024-01-18 13:00:28 UTC
Git commit 0422fca73311cd001799d7fbad5a0031560b143b by Nicolas Fella.
Committed on 18/01/2024 at 13:40.
Pushed by nicolasfella into branch 'master'.

Fix 'Still looking' text centering

Anchoring the footer isn't really possible

Instead make sure that the footer fills the width so that the layout's alignment can work

M  +1    -1    discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/-/commit/0422fca73311cd001799d7fbad5a0031560b143b
Comment 5 Nicolas Fella 2024-01-18 13:01:13 UTC
Git commit 37e7888b54dd5be6e3d02afc1523bc57c49cb609 by Nicolas Fella.
Committed on 18/01/2024 at 14:01.
Pushed by nicolasfella into branch 'Plasma/6.0'.

Fix 'Still looking' text centering

Anchoring the footer isn't really possible

Instead make sure that the footer fills the width so that the layout's alignment can work
(cherry picked from commit 0422fca73311cd001799d7fbad5a0031560b143b)

M  +1    -1    discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/-/commit/37e7888b54dd5be6e3d02afc1523bc57c49cb609