Xfce Forum

Sub domains
 

You are not logged in.

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

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

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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

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


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 2017-05-24 15:51:27

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

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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

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.


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 2017-05-25 09:57:52

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

Offline

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

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

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: 24

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: 831

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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

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.


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

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

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

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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Thunar colors in GTK theme

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


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

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

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

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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

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.


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

#14 2018-10-21 17:51:29

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

Re: Thunar colors in GTK theme

Sorry for taking so long, much stuff is happening in life.

The theme is called Telinkrin. I also tried with Adwaita, Aduru, MintX, Traditional Human, Radiant-Mate and several others. The only one that gives the color I have chosen is Greybird.

Empty file didn't help either. Here is my current gtk.css:

.thunar .sidebar {background-color: #5e95a6;}

* {
   -gtk-icon-style: regular;
   -gtk-icon-shadow: shadow;
}
/* Adding the buttons on the edges (if you don't need them, skip the next 4 lines)
 */

.scrollbar {
  -GtkScrollbar-has-backward-stepper: 1;
  -GtkScrollbar-has-forward-stepper: 1;
  -GtkRange-slider-width: 20;
}

/* Scrollbar trough squeezes when cursor hovers over it. Disabling that
 */

.scrollbar.vertical:hover:dir(ltr),
.scrollbar.vertical.dragging:dir(ltr) {
    margin-left: 0px;
}

.scrollbar.vertical:hover:dir(rtl),
.scrollbar.vertical.dragging:dir(rtl) {
    margin-right: 0px;
}

.scrollbar.horizontal:hover,
.scrollbar.horizontal.dragging,
.scrollbar.horizontal.slider:hover,
.scrollbar.horizontal.slider.dragging {
    margin-top: 0px;
}

/* Slider widens to fill the scrollbar when cursor hovers over it. Making it permanent
 */

.scrollbar.slider.vertical:dir(ltr):not(:hover):not(.dragging) {
    margin-left: 0px;
}

.scrollbar.slider.vertical:dir(rtl):not(:hover):not(.dragging) {
    margin-right: 0px;
}

.scrollbar.slider.horizontal:not(:hover):not(.dragging) {
    margin-top: 0px;
}

.menu {
	border: 1px solid gray;
}
/* Custom styles */

/* select-on */
@define-color selected_bg_color #cfdbae;
@define-color selected_fg_color #eeeeee;
@define-color theme_selected_bg_color @selected_bg_color;
@define-color theme_selected_fg_color @selected_fg_color;
/* select-on */

/* End custom styles */

Offline

#15 2018-10-21 18:59:02

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

Re: Thunar colors in GTK theme

Ugh. A typo. I'm missing a "*". Try this instead:

.thunar .sidebar* {background-color: #5e95a6;}

Edit:Actually, this might be better (won't cover the scrollbar):

.thunar .sidebar .view {background-color: #5e95a6;}

Last edited by ToZ (2018-10-21 19:08:50)


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

#16 2018-10-23 18:13:17

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

Re: Thunar colors in GTK theme

That did the trick! Thanks! big_smile

Offline

Board footer

Powered by FluxBB