SUMMARY Widget won't shrink to less than 2 rows and 2 columns. Ideally, I'd like to have it as one row high. STEPS TO REPRODUCE 1. Add folder view widget to desktop 2. Try to resize to one row of height OBSERVED RESULT The minimum height and width appear to be 2 rows and 2 columns EXPECTED RESULT The widget should be re-sizable to a single row or column SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora Linux 43 KDE Plasma Version: 6.5.5 KDE Frameworks Version: 6.22.0 Qt Version: 6.10.1
Intent of the code seems to be to have a minimum height/width of 1 icon: https://invent.kde.org/plasma/plasma-desktop/-/blob/master/containments/desktop/package/contents/ui/main.qml?ref_type=heads#L101 Not sure yet why it doesn't work.
I asked Claude to take a look at this and I think it may have found the bug: https://claude.ai/share/9d83b7bf-0b64-4edc-8049-8e6d67e8d4ce
(In reply to chaos from comment #2) > I asked Claude to take a look at this and I think it may have found the bug: > https://claude.ai/share/9d83b7bf-0b64-4edc-8049-8e6d67e8d4ce That's wrong and has nothing to do with this. This is to reserve the space for the (optional) label over the grid showing which folder it is, but that space is taken up by the label (and is much smaller than a full row). The real issue is that I was wrong; the intent of the code is to use the preferred sizes as the minimum size for desktop widgets (and the preferred size is a minimum of two rows, and three columns), see here: https://invent.kde.org/plasma/plasma-desktop/-/blob/master/containments/desktop/package/contents/ui/main.qml?ref_type=heads#L448 To get the intended minimum sizes, you need to specify the argument true, but we don't; we make it conditional on isPopup (which, awkwardly, isn't only for popups, but for any in-panel Folder View. In the panel popup of FolderView, (unless the panel is large enough to not need a popup), it works and allows you to change it to be one column or one row. (Though the precise sizing could be improved a bit). I'm not sure there's a good reason for not allowing it to be smaller; I don't see one immediately so I think it still makes sense to change this (and make the precise sizing a bit better). But the code seems to work as intended.