Page 1 of 1

Icon distance on desktop [SOLVED]

Posted: Fri Jul 03, 2020 12:09 pm
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.

Re: Icon distance on desktop

Posted: Fri Jul 03, 2020 1:58 pm
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.

Re: Icon distance on desktop

Posted: Sat Jul 04, 2020 1:50 pm
by Sparky
Thank you!

Re: Icon distance on desktop [SOLVED]

Posted: Tue Jul 07, 2020 8:02 pm
by Sparky
P.S. this should be dealt with as a bug.

Re: Icon distance on desktop [SOLVED]

Posted: Fri Jul 10, 2020 10:17 pm
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.).

Re: Icon distance on desktop [SOLVED]

Posted: Sat Jul 11, 2020 5:55 am
by Sparky
Stuart_m's post worked great and is easy to do.

Re: Icon distance on desktop

Posted: Sat Oct 30, 2021 7:06 am
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: