Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-07-23 12:56:11

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Desktop Icons: Settings

Hello,

Where can I find the exact explanation of this two lines in the file " ~/.config/gtk-3.0/no-ellipse-desktop-filenames.css":

-XfdesktopIconView-cell-padding:20;
-XfdesktopIconView-cell-text-width-proportion:3.3;


I thought, that "XfdesktopIconView-cell-text-width-proportion" would be to define the place between the icons horizontal.
And that maybe "XfdesktopIconView-cell-padding" would define the vertikal distance between the icons.

But when I change "XfdesktopIconView-cell-text-width-proportion", somehow the vertical and the horizontal distance changes.

Strange? I have made experiments, but did not find out the definition of this settings. I have searched in Google, but I found not any explanation anywhere about this settings.

Thank you.

Last edited by Tabespe (2020-07-27 12:02:00)

Offline

#2 2020-07-23 13:37:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Desktop Icons: Settings

See: https://docs.xfce.org/xfce/xfdesktop/advanced.

The code there is for GTK2, but the explanations below the code still hold for GTK3.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-07-23 14:43:01

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

Thank you for the link.

I still do not understand how it works.

Quote from https://docs.xfce.org/xfce/xfdesktop/advanced:
"The third four entries set spacing and sizing for individual icons on the grid. The 'cell-spacing' property specifies the spacing between each 'cell' in the grid of icons. The 'cell-padding' property sets extra padding placed around each icon+text. The units for these two are in pixels. The 'cell-text-width-proportion' property specifies the maximum width of the text label underneat the icon, as a multiplier of the icon width (so for 30px icons, '2.5' would leave a 75px wide area underneath for the text)."




A) In the quote from the link is said:
"The third four entries ..."

This seems to be wrong. There are only third three entries. Namely:
-XfdesktopIconView-cell-spacing:0;
-XfdesktopIconView-cell-padding:0;
-XfdesktopIconView-cell-text-width-proportion:2.8;

Also on the source page. What do I miss?





B) I have now created a " ~/.config/gtk-3.0/no-ellipse-desktop-filenames.css" with this content:

XfdesktopIconView.view {
    -XfdesktopIconView-label-alpha:0;
    -XfdesktopIconView-selected-label-alpha:0;
    -XfdesktopIconView-ellipsize-icon-labels:0;
    -XfdesktopIconView-tooltip-size:128;
   
    -XfdesktopIconView-cell-spacing:0;
    -XfdesktopIconView-cell-padding:0;
    -XfdesktopIconView-cell-text-width-proportion:2.8;
}

As -XfdesktopIconView-cell-spacing:0 is "0", this means the cells in the grid has no distance. So I wopuld expect, that all icons are in one cell. So when my desktop has 10 icons, all icons should be at the same position, because there is no space between them. Or it should at least be possible to manually move the icons very close together so that all 10 icons are on top of each other.

As -XfdesktopIconView-cell-paddinDeshalb würde ich auch wieder das Verhalten, das ich vorher beschrieben habe erwarten.g:0 is also "0", this means there are no additional place around an icon. Therefore I would again expect the behaviour I have described before.

As -XfdesktopIconView-cell-text-width-proportion:2.8 is 2.8 this means, the additional place for "text" is 2.8x0=0 . Therefore I would again expect the behaviour I have described before.

But what I have is a grid with 13x11 icons on a 1280x1024 monitor.

I just can not understand how this settings work.

Last edited by Tabespe (2020-07-23 14:44:44)

Offline

#4 2020-07-23 16:00:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Desktop Icons: Settings

Tabespe wrote:

B) I have now created a " ~/.config/gtk-3.0/no-ellipse-desktop-filenames.css" with this content:

Unless you are sourcing this file from ~/.config/gtk-3.0/gtk.css, it won't be read. You need to add it to that (gtk.css) file and restart xfdesktop ("pkill xfdesktop").

Also try first with large cell spacing numbers so you can see the effect to make sure it is working, then fine tune.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2020-07-23 20:27:53

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

Not sure if I understand right:

Are you trying to say that in the file ~/.config/gtk-3.0/gtk.css I have to make a reference to the file " ~/.config/gtk-3.0/no-ellipse-desktop-filenames.css"? If yes, how would this reference look like?

Or are you trying to say, that I just have to copy the lines:
XfdesktopIconView.view {
    -XfdesktopIconView-label-alpha:0;
    -XfdesktopIconView-selected-label-alpha:0;
    -XfdesktopIconView-ellipsize-icon-labels:0;
    -XfdesktopIconView-tooltip-size:128;
   
    -XfdesktopIconView-cell-spacing:0;
    -XfdesktopIconView-cell-padding:0;
    -XfdesktopIconView-cell-text-width-proportion:2.8;
}
into the file "~/.config/gtk-3.0/gtk.css", and that the file "~/.config/gtk-3.0/no-ellipse-desktop-filenames.css" is useless ?

Last edited by Tabespe (2020-07-23 20:28:45)

Offline

#6 2020-07-23 22:37:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Desktop Icons: Settings

The easiest way is to put the content into the ~/.config/gtk-3.0/gtk.css file and restart xfdesktop.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2020-07-24 19:01:14

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

Unfortunately the command "pkill xfdesktop" seems not to work.
I always have to log me out and in.

Offline

#8 2020-07-24 20:05:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Desktop Icons: Settings

Another method is:

xfdesktop -Q && sleep 1 && xfdesktop &

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2020-07-25 08:24:25

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

Thank you. Great!
xfdesktop -Q && sleep 1 && xfdesktop &
... effectively refreshes the desktop. I like it. Although it gives a lot of error messages, but it works.

The error line in terminal is:
"(xfdesktop:11459): GLib-CRITICAL **: 10:22:08.503: g_base64_encode_step: assertion 'in != NULL' failed"
... about 35 times.

Last edited by Tabespe (2020-07-25 11:04:09)

Offline

#10 2020-07-25 13:18:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Desktop Icons: Settings

Tabespe wrote:

The error line in terminal is:
"(xfdesktop:11459): GLib-CRITICAL **: 10:22:08.503: g_base64_encode_step: assertion 'in != NULL' failed"
... about 35 times.

Which version of xfdesktop:

xfdesktop -V

I believe this has been fixed, but probably in a later version than you are running


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2020-07-25 13:43:33

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

xfdesktop Version 4.14.2, on Xfce 4.14.

But I made further tests now:
The error appears only in my VM, but not in my life system, although my VM is also up-to-date and has the same version of xfdesktop.

Offline

#12 2020-07-25 13:48:48

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Desktop Icons: Settings

Found the reference (https://gitlab.gnome.org/GNOME/gtk/-/issues/1700). Looks like it was related to the version of glib being used.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2020-07-25 15:05:29

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

Thank you.

I have now tried another theme in the VM. When I take the same theme in the VM like in the life system, then the error is away/solved.

Offline

#14 2020-07-27 11:59:21

Tabespe
Member
Registered: 2019-12-04
Posts: 129

Re: Desktop Icons: Settings

Tabespe wrote:

Strange? I have made experiments, but did not find out the definition of this settings. I have searched in Google, but I found not any explanation anywhere about this settings.

ToZ wrote:

See: https://docs.xfce.org/xfce/xfdesktop/advanced.

The code there is for GTK2, but the explanations below the code still hold for GTK3.

I still do not understand how it works.

ToZ wrote:

... try first with large cell spacing numbers so you can see the effect to make sure it is working, then fine tune.


The setting "Cell spacing" (XfdesktopIconView-cell-spacing):

Quote from https://docs.xfce.org/xfce/xfdesktop/advanced: "The 'cell-spacing' property specifies the spacing between each 'cell' in the grid of icons."

That seems to be completely wrong!
What it really does is to vary the distance between the icon and the text under this icon. If the value is set to 20, then there is quite a large distance between the icon and the label. Negative values are also possible. I have chosen "-4". This moves the label closer to the icon. But the grid and the distances between the icons are not affected by this setting!

Or am I missing anything?

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 595.7 KiB (Peak: 612.54 KiB) ]