Reply to topic

How to restore desktop icon spacing after 5.14.5 update

albenson
Registered Member
Posts
12
Karma
1
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.
astevec
Registered Member
Posts
1
Karma
0
Thanks for the fix, worked perfectly.

Now I have to do it for all my other users, pita.

Agree with your comments, it looks awful.

Steve.
genx
Registered Member
Posts
1
Karma
0
But it does not resolve font size issue right ! i have to rename minIconwidth in next string or return string ?
BTW ! +99999999 against the new ugly rectangular grid +space between icons .
for me , its like this ,is it right ?
Image
User avatar Rog131
Registered Member
Posts
828
Karma
10
Earlier: Reducing space between desktop icons - viewtopic.php?f=289&t=136447

Usually the KDE is using user settings and scripts before the system. If you copy the /usr/share/plasma/plasmoids/org.kde.desktopcontainment/ to the ~/.local/share/plasma/plasmoids/org.kde.desktopcontainment/ then you don't need to edit the Qml scripts after every plasma update.

The Bug has been reported as Bug 403094 - Implement a slider to control horizontal grid spacing - https://bugs.kde.org/show_bug.cgi?id=403094
User avatar Fritigern
Registered Member
Posts
1
Karma
0
OS
Rog131 wrote:The Bug has been reported as Bug 403094 - Implement a slider to control horizontal grid spacing - https://bugs.kde.org/show_bug.cgi?id=403094


Is there a way to upvote this feature request? Because I too had the issue and would love better controls for Icon spacing (x and y) and perhaps font size for the icon labels as an individual control as was suggested in https://bugs.kde.org/show_bug.cgi?id=403355.
Upvoting might increase the chances of such a control getting added.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bartoloni, Bing [Bot], boudewijn, chinesekid, dbarron, Exabot [Bot], gm40, Google [Bot], josefcarel, robertseetzen, tymond