Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-06-23 12:59:55

fusion809
Member
Registered: 2016-06-23
Posts: 4

How do I change the background colour of the Thunar Sidepane?

Hi,

I am working on a theme (GitHub URL: https://github.com/fusion809/OSX-Arc-White) that presently works fine for GNOME but on Xfce it gives t7HZZ4X.png, as you can see it's impossible to see the non-selected items in the Thunar sidebar. Which GTK class(s) do I need to edit in order to adjust this background colour? Plus it would help if there was some way I could look at which GTK classes that are being applied to each element under Xfce. I know under GNOME that adding: GTK_DEBUG=interactive to before the command that launches the program I want to debug will launch the GTK Inspector app, to inspect the GTK classes being applied to each element.

Thanks for your time,
Brenton

Last edited by fusion809 (2016-06-23 13:01:09)

Offline

#2 2016-06-23 13:58:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: How do I change the background colour of the Thunar Sidepane?

Try something like:

style "my-thunar-sidebar"
{
    
  GtkTreeView::odd_row_color = "#ff0000"
  GtkTreeView::even_row_color = "#ff0000"

  base[NORMAL] = "#ff0000"
  base[INSENSITIVE] = "#ff0000"

  text[NORMAL] = "#00ff00"
  text[ACTIVE] = "#0000ff"
  text[SELECTED] = "#0000ff"
}

widget_class "*ThunarShortcutsView*"		style "my-thunar-sidebar"
widget_class "*ThunarTreeView*"			style "my-thunar-sidebar"
widget_class "*GtkFileChooserWidget.GtkFileChooserDefault.GtkVBox.GtkHPaned.GtkVBox.GtkScrolledWindow.GtkTreeView*"   style "my-thunar-sidebar"

Plus it would help if there was some way I could look at which GTK classes that are being applied to each element under Xfce. I know under GNOME that adding: GTK_DEBUG=interactive to before the command that launches the program I want to debug will launch the GTK Inspector app, to inspect the GTK classes being applied to each element.

Since Thunar is still a GTK2 based app, you need to use GTK Parasite to get this debug view. Install gtk-parasite and run:

GTK_MODULES=gtkparasite thunar

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 2016-06-23 14:26:48

fusion809
Member
Registered: 2016-06-23
Posts: 4

Re: How do I change the background colour of the Thunar Sidepane?

Ah, your little tweak hasn't had any effect for me (I tried to apply it by adding it to the gtk-2.0/gtkrc file in my theme folder, I even ran xfce4-panel -r to ensure it wasn't a mere matter of reloading to see the difference). Running GTK_MODULES=gtkparasite thunar after installing gtkparasite with:

yaourt -S gtkparasite-gtk2

(as you can guess I am using Arch Linux), launched thunar but without the GTK parasite window

Last edited by fusion809 (2016-06-23 14:27:46)

Offline

#4 2016-06-23 14:34:48

fusion809
Member
Registered: 2016-06-23
Posts: 4

Re: How do I change the background colour of the Thunar Sidepane?

If you're wondering if this is some bug in gtkparasite, well it seems less likely as running GTK_MODULES=gtkparasite mousepad launches the GTK Parasite and Mousepad windows without a problem. Likewise running GTK_MODULES=gtkparasite leafpad launches both the GTK Parasite and Leafpad windows without problem.

Last edited by fusion809 (2016-06-23 14:43:44)

Offline

#5 2016-06-23 16:53:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: How do I change the background colour of the Thunar Sidepane?

Restarting the panel won't help here. Try killing all instances of Thunar (including the daemon) first:

thunar -q

I'm also running Arch and put the snippet in ~/.gtkrc-2.0 and it works. You should be able to embed this snippet in your theme's gtk-2.0/gtkrc file as well.


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

#6 2016-06-23 17:06:50

fusion809
Member
Registered: 2016-06-23
Posts: 4

Re: How do I change the background colour of the Thunar Sidepane?

Thanks a million! 'tis working now.

Offline

Board footer

Powered by FluxBB