Bug 472114 - The sidebar doesn't show subcategories or it gets too small depending on window size
Summary: The sidebar doesn't show subcategories or it gets too small depending on wind...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: sidebarview (show other bugs)
Version: master
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 475321 476828 476926 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-10 00:08 UTC by guimarcalsilva
Modified: 2023-11-22 00:27 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description guimarcalsilva 2023-07-10 00:08:47 UTC
SUMMARY
The sidebar seems to behave differently depending on the window size. It only works normally if the window is small. If you resize it to be big but not quite enough to fill the screen, the sidebar items will get squeezed and text will be cut off. If you maximize the window, subcategories are not shown, only the main menu items.

Here's a video of the issue: https://www.youtube.com/watch?v=VyGnWMkYhn8

STEPS TO REPRODUCE
1. Open System Settings (make sure it's at the minimum size, if not, resize and restart)
2. Enter the appearance category
3. Slowly resize the window (you'll see it switch to 2-column mode, but everything will be squeezed)
4. Resize System Settings to the minimum size, close it, and open it again
5. Go to the appearance category once again
6. This time click the maximize button (the subcategories won't be shown, only the main sidebar)

OBSERVED RESULT
At big but not maximized sizes, the 2 sidebars will be too small. In the maximized state, it won't show subcategories. Check the linked video above for more details.

EXPECTED RESULT
Work the same way as Plasma 5.27

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.5.1
Kernel Version: 5.19.0-46-generic (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Running on a virtual machine on an X11 session at 1x scale and 1920x1080 resolution.
Comment 1 Patrick Silva 2023-10-07 23:47:47 UTC
*** Bug 475321 has been marked as a duplicate of this bug. ***
Comment 2 Patrick Silva 2023-11-13 12:04:34 UTC
*** Bug 476926 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2023-11-14 22:14:42 UTC
*** Bug 476828 has been marked as a duplicate of this bug. ***
Comment 4 Fushan Wen 2023-11-19 12:51:06 UTC
See also https://bugreports.qt.io/browse/QTBUG-92820?jql=text%20~%20%22qquickwidget%20signal%22

The problem exists in the connection. QQuickItem::implicitWidthChanged is never sent to the backend.

```
    connect(d->quickWidget->rootObject(), &QQuickItem::implicitWidthChanged, this, [this]() {
        const int rootImplicitWidth = d->quickWidget->rootObject()->property("implicitWidth").toInt();
        if (rootImplicitWidth != 0) {
            d->quickWidget->setFixedWidth(rootImplicitWidth);
        } else {
            d->quickWidget->setFixedWidth(240);
        }
    });
```
Comment 5 Bug Janitor Service 2023-11-19 14:46:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/270
Comment 6 Fushan Wen 2023-11-22 00:27:37 UTC
Git commit 75490ec7d1be51101dcbdd7585782b399181a9dd by Fushan Wen.
Committed on 21/11/2023 at 10:04.
Pushed by fusionfuture into branch 'master'.

sidebar: fix subcategory width

In Qt6 the root item of a QQuickWidget no longer persists for the life
time of the widget, unless the root item is created outside the widget.

See https://github.com/qt/qtdeclarative/commit/0d80dbd8c2cfc2a7d2a4d970b7acfc7fb5fb97a0
and https://github.com/qt/qtdeclarative/commit/69d61fecf2deee7510f5f2448614174683744d82
and https://bugreports.qt.io/browse/QTBUG-92820
FIXED-IN: 6.0

M  +16   -10   app/sidebar/SidebarMode.cpp

https://invent.kde.org/plasma/systemsettings/-/commit/75490ec7d1be51101dcbdd7585782b399181a9dd