Reply to topic

How to restore desktop icon spacing after 5.14.5 update

Registered Member
The Plasma 5.14.5 update changed the icon spacing on the desktop again. If you (like me) liked it the other way, without giant horizontal spaces between the icons, there's an easy fix. If you revert the code used to set the cell width (in the icon grid on the desktop) back to the way it was before, it will look like it used to. To do this:

Open the file /usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderView.qml in your choice of text editor. If you use Kate or Kwrite, it will automatically prompt for superuser privileges when you go to save, which is very convenient.

Scroll down to line 597 (in 5.14.5; in other versions it may vary) and you should see some code that looks like this:
Code: Select all
cellWidth: {
    if (root.useListViewMode) {
        return gridView.width;
    } else {
        var iconWidth = iconSize + (2 * units.largeSpacing) + (2 * units.smallSpacing);
        if (root.isContainment && isRootView && scrollArea.viewportWidth > 0) {
            var minIconWidth = Math.max(iconWidth, units.iconSizes.small * 8);
            var extraWidth = calcExtraSpacing(minIconWidth, scrollArea.viewportWidth);
            return minIconWidth + extraWidth;

In the code above, remove this line (line 603 in 5.14.5):
Code: Select all
var minIconWidth = Math.max(iconWidth, units.iconSizes.small * 8);

On the next line down, change 'minIconWidth' to 'iconWidth'. Note that the case of the letter i has changed from upper to lower case, in addition to the string 'max' being deleted.

Save the file (it's a good idea to make a copy of the original first), then log out and back in. That should do it!

Note that this will be redone each time Plasma updates, unless things change again to where this isn't needed or relevant. To me, the icon cells are so huge horizontally now that it looks like a bug, but something that obvious would be hard to miss before release, so I am assuming it was intentional.

Reply to topic


Who is online

Registered users: Baidu [Spider], bernieke, Bing [Bot], Exabot [Bot], Google [Bot], Sogou [Bot], TheraHedwig