Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-05-17 13:02:40

Imerion
Member
Registered: 2015-04-04
Posts: 21

Thunar colors in GTK theme

Hi everyone!

I really love the beautiful Greybird theme, but I'm currently restyling my computer with a bit of a lighter "summer" look, so I decided to use the Radiant-MATE theme(https://github.com/flexiondotorg/ubuntu-mate-themes/tree/master/usr/share/themes/Radiant-MATE) instead.

Generally it works great with XFCE. But there is one thing I'd like to change: The Side Pane in Thunar have this nicely tinted background in Greybird, matching the system color theme. Is it possible to change Radiant-MATE to have that effect as well? I tried looking through "gtkrc", but there are so many colors listed I'm not sure what to change. smile

Also, if anyone knows which color is the background for menu bars (The File, Edit, View, etc) I'd love to change that too. smile

Offline

#2 2017-05-17 18:27:24

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,662

Re: Thunar colors in GTK theme

The file you want to look at is gtk-2.0/apps/thunar.rc, specifically the "sidepane" style. The "base[NORMAL]" parameter is what changes the sidepane colour. Greybird currently uses:

base[NORMAL]        = mix (0.1, shade (1.35,@selected_bg_color), shade (0.9,@base_color))

...to create the effect

Offline

#3 2017-05-24 15:51:27

Imerion
Member
Registered: 2015-04-04
Posts: 21

Re: Thunar colors in GTK theme

Thanks! But adding gtk-2.0/apps/thunar.rc as it is in Greybird to my new theme doesn't seem to work. Is it because I need to change base_color to something else in another file?

Offline

#4 2017-05-24 17:02:12

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,662

Re: Thunar colors in GTK theme

Without seeing the contents of your theme files it would be hard to say, but you need to make sure that it's referenced properly, Try this. In ~/.gtkrc-2.0, add the following content:

style "my-thunar-colours"
{
   base[NORMAL]        = "#ff0000"
}
widget_class "*ThunarShortcutsView*"		style "my-thunar-colours"
widget_class "*ThunarTreeView*"			style "my-thunar-colours"

...then change the appearance theme away and back again.

Offline

#5 2017-05-25 09:57:52

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 578
Website

Offline

#6 2017-05-30 13:36:25

Imerion
Member
Registered: 2015-04-04
Posts: 21

Re: Thunar colors in GTK theme

ToZ wrote:

Without seeing the contents of your theme files it would be hard to say, but you need to make sure that it's referenced properly, Try this. In ~/.gtkrc-2.0, add the following content:

style "my-thunar-colours"
{
   base[NORMAL]        = "#ff0000"
}
widget_class "*ThunarShortcutsView*"		style "my-thunar-colours"
widget_class "*ThunarTreeView*"			style "my-thunar-colours"

...then change the appearance theme away and back again.

That worked perfect! Thanks! big_smile

Using an image was also a smart suggestion sixsixfive. Will try that if I need some other time!

Offline

#7 2018-10-01 17:30:45

Imerion
Member
Registered: 2015-04-04
Posts: 21

Re: Thunar colors in GTK theme

Sorry for reviving this old thread, but how would I do this with the new GTK3-version of Thunar? smile

Offline

#8 2018-10-01 17:45:58

alcornoqui
Member
Registered: 2014-07-28
Posts: 305

Re: Thunar colors in GTK theme

Imerion wrote:

Sorry for reviving this old thread, but how would I do this with the new GTK3-version of Thunar? smile

I think this doc might help:

https://developer.gnome.org/gtk3/stable … t-css.html

Please tell us the updated solution if you get it!

Offline

#9 2018-10-01 17:56:45

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,662

Re: Thunar colors in GTK theme

Imerion wrote:

Sorry for reviving this old thread, but how would I do this with the new GTK3-version of Thunar? smile

Try:

.thunar .sidebar {background-color: #fafe23;}

...change the colour to suit.

Offline

#10 2018-10-02 20:27:09

Imerion
Member
Registered: 2015-04-04
Posts: 21

Re: Thunar colors in GTK theme

I tried putting that at the bottom of the gtk.css file of my theme, but it doesn't seem to work.

Offline

#11 2018-10-02 22:37:47

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,662

Re: Thunar colors in GTK theme

Put it in ~/.config/gtk-3.0/gtk.css. Create the file if it doesn't exist.

Offline

#12 2018-10-08 10:18:35

Imerion
Member
Registered: 2015-04-04
Posts: 21

Re: Thunar colors in GTK theme

I tried that too, putting it both at the top and at the bottom. I thought Thunar might be mentioned at other places in the file but that wasn't the case. (There was quite a lot of content in it though.) I also tried it with different themes but I can't seem to get it right. Using Thunar 1.8.2 now.

Thanks for helping though, it's really appreciated!

Offline

#13 2018-10-08 12:32:30

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,662

Re: Thunar colors in GTK theme

Which appearance theme are you using? I'll test it. Maybe its doing something weird. It works for me with Adwaita and Greybird.

xfconf-query -c xsettings -p /Net/ThemeName

Can you post the contents of ~/.config/gtk-3.0/gtk.css?

Maybe also try with an empty gtk.css except for the snippet above.

Offline

Board footer

Powered by FluxBB