Icon distance on desktop [SOLVED]

Message
Author
User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Icon distance on desktop [SOLVED]

#1 Post by Sparky »

I reconfigured the text size on MX Tweak "Disable shortening of long file names in desktop". The thing is that now the icons are really far from each other and I'll soon run out of space. Is there something else on MX-Tweak I should have checked to make the icon size normal again?

P.S. and the icons are smaller as well, would prefer the old size if possible.
Last edited by Sparky on Sat Jul 04, 2020 1:50 pm, edited 1 time in total.
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

Stuart_M
Posts: 690
Joined: Wed Aug 07, 2019 7:10 pm

Re: Icon distance on desktop

#2 Post by Stuart_M »

I noticed the same thing when I tried that setting months ago. I thought I'd see if I could get the spacing to a sane level and came up with the following which should solve the problem. I don't know if there's another (easier) way...

To change the spacing, go to ~/<user_name>/.config/gtk-3.0 and open "no-ellipse-desktop-filenames.css" with your text editor. Note that this .css file is created when you enable "Disable shortening of long filenames on the desktop". Also note that when you disable that setting, that file is removed along with the change.

You want to change the numerical values in the last two lines in that file. Those lines are shown below with the default values shown (the values will be changed as detailed below):

Code: Select all

-XfdesktopIconView-cell-padding:20;
-XfdesktopIconView-cell-text-width-proportion:3.3;
I spent a couple hours testing and came up with the below values for my 1080p monitor. The spacing comes very close to the default spacing when "Disable shortening of long filenames..." is not enabled (checked) so I'm guessing the following values should be pretty close to what you want (at a 1080 resolution).

...cell padding:2.5
...cell-text-width-proportion:2.5

After editing that .css file, Save > log out > log in and see the new spacing. You'll probably have to play with those two values until you get it to your satisfaction.

Note that any changes in the text-width-proportion value in whole numbers will greately change the vertical spacing so you'll want to make changes in tenths. For example if I changed this setting to "1.3" then the icons are so close together that they overlap eachother. Using 2.0 is better, but they are a lot tighter together than the default ("Disable shortening of long filenames..." being unchecked) spacing.

What I found is that padding affects mostly horizontal spacing and text-width-proportion mostly affects vertical spacing.

To ensure that long filenames are still possible, I tested a 62-character desktop icon filename which worked just fine. I am sure it'll accept longer still.

Look at JayM's post about changing the desktop grid for desktop icon spacing here viewtopic.php?p=580729#p580729, which involves editing the gtk.css file, but that is for when "Disable shortening of long filenames..." is not enabled (when it is unchecked), which is not what you want.

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: Icon distance on desktop

#3 Post by Sparky »

Thank you!
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: Icon distance on desktop [SOLVED]

#4 Post by Sparky »

P.S. this should be dealt with as a bug.
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

az2020
Posts: 175
Joined: Sun Apr 28, 2019 10:36 pm

Re: Icon distance on desktop [SOLVED]

#5 Post by az2020 »

FYI: My notes have another post by BV06 with similar info as Stuart's post above. BV06 talks about XfdesktopIconView-cell-spacing too (but not XfdesktopIconView-cell-text-width-proportion). That might interest the OP.

(I haven't played with any of that stuff yet. I'm going to. I wasn't aware of the "disable shortening." That's what I was googling for when I found Stuart's post. I just wanted to add that other thread I saved a long time ago.).

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: Icon distance on desktop [SOLVED]

#6 Post by Sparky »

Stuart_m's post worked great and is easy to do.
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

User avatar
K_B_Tidwell
Posts: 13
Joined: Thu Sep 02, 2021 9:25 am

Re: Icon distance on desktop

#7 Post by K_B_Tidwell »

Stuart_M wrote: Fri Jul 03, 2020 1:58 pm To change the spacing, go to ~/<user_name>/.config/gtk-3.0 and open "no-ellipse-desktop-filenames.css" with your text editor. Note that this .css file is created when you enable "Disable shortening of long filenames on the desktop". Also note that when you disable that setting, that file is removed along with the change.

You want to change the numerical values in the last two lines in that file. Those lines are shown below with the default values shown (the values will be changed as detailed below):

Code: Select all

-XfdesktopIconView-cell-padding:20;
-XfdesktopIconView-cell-text-width-proportion:3.3;
Sparky wrote: Sat Jul 11, 2020 5:55 am Stuart_m's post worked great and is easy to do.
Not trying to necro, but this thread is still very relevant. I wanted to thank Sparky and Stuart for bringing up this subject and fixing it. Using these directions I had my desktop fixed within 30 seconds this morning at 5:50 am before my coffee had even kicked in yet. Simple and easy!

I will submit for future viewers of this page that Stuart's initial settings change listed here:
Stuart_M wrote: Fri Jul 03, 2020 1:58 pm ...cell padding:2.5
...cell-text-width-proportion:2.5
worked perfectly on the Acer C710, circa 2013, that I have converted from ChromeOS to MX Linux. No other changes needed. This is a 1366 x 768 display, so screen space is at a premium. I won't say I won't tweak it later, but right now it looks great.

Thank you again and Happy Halloween to all! Thank you Stuart for my treat. :happy:
K B

Post Reply

Return to “General”