Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-01-08 00:41:13

Gotit
Member
Registered: 2019-01-08
Posts: 39

[Solved] Desktop Icon Labels Truncated

Hi - I've been trying to configure my desktop so the icon labels display fully instead of being truncated after 6 or 7 characters.  I followed the instructions here https://forum.xfce.org/viewtopic.php?id=11878 and tried the code for both gtk2 and gtk3 separately, but neither had any effect.

I'm running Antergos with:
XFCE4ui 4.12.1-3
gtk2 2.24.32-1
gtk3 3.24.2+7+g43aeb52b73-1

Is there something else I need to do?
PS I didn't want to necrobump the topic in the link above as it's 1+yrs old.

Last edited by Gotit (2019-01-12 16:40:14)

Offline

#2 2019-01-08 01:56:03

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

Re: [Solved] Desktop Icon Labels Truncated

Hello and welcome.

Which version of xfdesktop are you running?

xfdesktop -V

tried the code for both gtk2 and gtk3 separately, but neither had any effect.

Can you post back the contents of your ~/.gtkrc-2.0 and ~/.config/gtk-3.0/gtk.css files?


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 2019-01-09 01:09:58

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

Hi - thanks for the quick reply

[steve@Asus405 ~]$ xfdesktop -V
This is xfdesktop version 4.12.4, running on Xfce 4.12.
Built with GTK+ 2.24.32, linked with GTK+ 2.24.32.
Build options:
    Desktop Menu:        enabled
    Desktop Icons:       enabled
    Desktop File Icons:  enabled

~/.gtkrc-2.0

# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.

include "/home/karasu/.gtkrc-2.0.mine"
gtk-theme-name="Numix-Frost-Light"
gtk-icon-theme-name="Numix"
gtk-font-name="Lato 11"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintslight"
gtk-xft-rgba="rgb"

~/.gtkrc-2.0.mine

# Should allow full names on Desktop icons
style "xfdesktop-icon-view" {
    XfdesktopIconView::ellipsize-icon-labels = 0
}
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

~/.config/gtk-3.0/gtk.css

# should show full icon text on desktop

* {
   -XfdesktopIconView-ellipsize-icon-labels: 0;
}

Offline

#4 2019-01-09 01:21:48

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

Re: [Solved] Desktop Icon Labels Truncated

I've run into this issue before and I'm not sure what the cause is. It's like the code as listed on the website doesn't work with some themes. To work around it, change the name of your style. For example, in ~/.gtkrc-2.0.mine, use:

# Should allow full names on Desktop icons
style "my-xfdesktop-icon-view" {
    XfdesktopIconView::ellipsize-icon-labels = 0
}
widget_class "*XfdesktopIconView*" style "my-xfdesktop-icon-view"

...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

#5 2019-01-09 13:41:10

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

I tried the changes you suggested, but no difference.  Desktop icon names remain truncated.
I tried different themes to see if that would make a difference, but no.

Is there something else I can try?

Offline

#6 2019-01-09 14:10:57

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

Re: [Solved] Desktop Icon Labels Truncated

Have you restarted xfdesktop? Or logged out and back in again? I can confirm that it works here for me using xfdesktop 4.12.

Can you post back the contents of your updated ~/.gtkrc-2.0.mine?


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 2019-01-09 19:22:30

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

Yes, logged out/in, also tried restarting just to be sure.

~/.gtkrc-2.0.mine

# Should allow full names on Desktop icons
style "my-xfdesktop-icon-view" {
    XfdesktopIconView::ellipsize-icon-labels = 0
}
widget_class "*XfdesktopIconView*" style "my-xfdesktop-icon-view"

Also, just FYI, I'm trying to get this working on 2 laptops.  They are identical Asus405UA machines with the same Antergos install/version.  I've tried the changes on both machines, but no joy.

Offline

#8 2019-01-09 20:24:53

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

Re: [Solved] Desktop Icon Labels Truncated

Let's eliminate some of the complexity. Try renaming ~/.gtkrc-2.0 (to something like ~/.gtkrc-2.0.BAK) and create a new ~/.gtkrc-2.0 file with just that content:

# Should allow full names on Desktop icons
style "my-xfdesktop-icon-view" {
    XfdesktopIconView::ellipsize-icon-labels = 0
}
widget_class "*XfdesktopIconView*" style "my-xfdesktop-icon-view"

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 2019-01-09 22:08:44

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

OK, progress! 
The whole icon name now displays. And I see why it wasn't working before.  The stock .gtkrc-2.0 comes with this line:

include "/home/karasu/.gtkrc-2.0.mine"

however my user name is "steve".  When I changed that line to my user it found and read the .gtkrc-2.0.mine file.
I am concerned this will break on an update as the comments say

# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.

should the maintainer make the user name a variable like $USER?

Now, one more thing.  Can I make the icon name field wider?  Right now it seems to be about 8 characters wide, how can I change it to be 20 wide?

Last edited by Gotit (2019-01-09 22:12:58)

Offline

#10 2019-01-09 23:43:32

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

Re: [Solved] Desktop Icon Labels Truncated

Gotit wrote:

OK, progress! 
The whole icon name now displays. And I see why it wasn't working before.  The stock .gtkrc-2.0 comes with this line:

include "/home/karasu/.gtkrc-2.0.mine"

however my user name is "steve".  When I changed that line to my user it found and read the .gtkrc-2.0.mine file.
I am concerned this will break on an update as the comments say

# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.

should the maintainer make the user name a variable like $USER?

This is not an Xfce thing. You must of used LXAppearance at one point in time that created this file or maybe copied it from somewhere. There actually is no reason to use LXAppearance in Xfce.

Now, one more thing.  Can I make the icon name field wider?  Right now it seems to be about 8 characters wide, how can I change it to be 20 wide?

See: https://docs.xfce.org/xfce/xfdesktop/advanced. The cell-spacing, cell-padding, and cell-text-width-proportion settings are the ones that you want to tweak.


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 2019-01-10 00:09:49

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

Update: I change xfdesktop-icon-view to my-xfdesktop-icon-view on my system and the post below and I get spacing out of icons and and their text fields, but the width of the text field does not change.  I still get:

File
System

instead of

File System

I brought the cell-spacing, cell-padding and cell-text-width-proportion setting into my ~/.gtkrc-2.0.mine file and increased them from the default value, but no change on the desktop.  This is what my file looks like:

# Should allow full names on Desktop icons
style "my-xfdesktop-icon-view" {
    XfdesktopIconView::ellipsize-icon-labels = 0

# These setting control the desktop icon text field size
    XfdesktopIconView::cell-spacing = 36
    XfdesktopIconView::cell-padding = 36
    XfdesktopIconView::cell-text-width-proportion = 25

}
widget_class "*XfdesktopIconView*" style "my-xfdesktop-icon-view"

I also placed them in the ~/.gtkrc-2.0 file, but again no joy.  What have I got wrong?

Last edited by Gotit (2019-01-10 00:17:33)

Offline

#12 2019-01-10 00:15:01

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

Re: [Solved] Desktop Icon Labels Truncated

Are you re-starting xfdesktop?

Try:

    XfdesktopIconView::cell-spacing = 50
    XfdesktopIconView::cell-padding = 50
    XfdesktopIconView::cell-text-width-proportion = 5.0

...I believe the last number has to be a float.


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 2019-01-10 00:22:14

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

OK, your numbers work better.  Guess I wasn't thinking big enough!!
I'll keep tweaking from here.
Oh, this is a fresh install of Antergos, so I guess they have LXAppearance in there for something.

Thanks for all your support!!!

Offline

#14 2019-01-12 16:39:19

Gotit
Member
Registered: 2019-01-08
Posts: 39

Re: [Solved] Desktop Icon Labels Truncated

In hope of saving someone else time in configuring their desktop (I logged out/in about 100 times), here is my

~/.gtkrc-2.0.mine

file content.
Note: I have a 14" FHD display with font size set to 130%, so your mileage may very accordingly.

style "my-xfdesktop-icon-view" {
# This setting allows full names on Desktop icons when = 0
# Any other value, even 0.0, makes the icon text field 2 lines
    XfdesktopIconView::ellipsize-icon-labels = 1

# These setting control the desktop icon text field size and location
# This controls space between the icon an its text field
    XfdesktopIconView::cell-spacing = 0.0

# This controls the space between icons both horizontal and vertical
    XfdesktopIconView::cell-padding = 0.0

# This controls the width of the icon text field
# Less than 2.5 the text field returns to 1 line
   XfdesktopIconView::cell-text-width-proportion = 2.8
# Note: icons and their text fields won't overlap, so the wider the
# icon text field, the further apart horizontally will be the icons

}
widget_class "*XfdesktopIconView*" style "my-xfdesktop-icon-view"

Last edited by Gotit (2019-01-12 16:43:41)

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 604.07 KiB (Peak: 621.35 KiB) ]