Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-11-18 21:40:31

hrqmonteiro
Member
Registered: 2020-11-18
Posts: 5

[Thunar] How to customize Thunar classes on gtk3 theme?

Hi, i am trying to setup some tweaks in my theme relating to Thunar, but how can i find the css classes that are into it?

I've saw through some posts here in the forum and some people who customized their thunar and i discovered some classes, like:

.thunar .standard-view .view
.thunar .sidebar
.thunar status bar

But how can i "discover" the rest of it so i know what am i editing? I tried the GTK Selector (https://wiki.gnome.org/action/show/Proj … /Inspector), but it really doesn't help in ANYTHING, be it in Thunar or another gkt application.

Anyone can help me please?

Offline

#2 2020-11-18 22:58:11

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,124

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

Hello and welcome.

Try the following:

thunar -q
GTK_DEBUG=interactive thunar

...click on the crosshairs in the top-left corner of the inspector window and then on the thunar window and you should see something like (you might need to select "CSS Nodes" from the dropdown):
EoCZ0s7l.png

The widgets are listed in the "Name" column and the classes in the "Style Classes" column.

Offline

#3 2020-11-19 00:10:54

hrqmonteiro
Member
Registered: 2020-11-18
Posts: 5

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

ToZ wrote:

Hello and welcome.

Try the following:

thunar -q
GTK_DEBUG=interactive thunar

...click on the crosshairs in the top-left corner of the inspector window and then on the thunar window and you should see something like (you might need to select "CSS Nodes" from the dropdown):
https://imgur.com/EoCZ0s7l.png

The widgets are listed in the "Name" column and the classes in the "Style Classes" column.

Hello,

This is actually what i have said. I tried it with the selector, but the "classes" don't match at all with the ones from Thunar. And if you try to change it, it doesn't do any changes.

For example, i have on my gtk3 theme, this css lines:

AiHXo8e.png

And this IS changing my thunar, but these classes, like "sidebar" doesnt appear at all at the Inspector. So it doesn't helps, at all.

Offline

#4 2020-11-19 01:46:00

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,124

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

hrqmonteiro wrote:

but these classes, like "sidebar" doesnt appear at all at the Inspector. So it doesn't helps, at all.

If you look at the first "scrolledwindow" entry in my screenshot, you'll notice that there are 3 classes defined: frame, shortcuts-pane, and sidebar.

What version of Thunar and what version of gtk3 are you running?

Here is what your first sidebar config looks like on my system:
xUMOyVol.png

And all of your sidebar configs:
tVAJT4hl.png

Offline

#5 2020-11-19 03:06:52

hrqmonteiro
Member
Registered: 2020-11-18
Posts: 5

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

ToZ wrote:
hrqmonteiro wrote:

but these classes, like "sidebar" doesnt appear at all at the Inspector. So it doesn't helps, at all.

If you look at the first "scrolledwindow" entry in my screenshot, you'll notice that there are 3 classes defined: frame, shortcuts-pane, and sidebar.

What version of Thunar and what version of gtk3 are you running?

Here is what your first sidebar config looks like on my system:
https://imgur.com/xUMOyVol.png

And all of your sidebar configs:
https://imgur.com/tVAJT4hl.png

Well, sorry for my stupidity lol, i could see now. Unfortunately, i knew the names of these classes already, i was hoping there would be any more of them so i could customize the sidebar more.

Since you apparently know more, could you help me, possibly?

I wanted to change only the color of the "Devices" and the "Places" text. But i wasn't able to. I tried tweaking everything, using "!important", but i couldn't. Any help?

Offline

#6 2020-11-19 03:47:25

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,124

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

I don't see a way that this is possible. There is no class assigned those "headers" and I don't see a way the CSS can be targeted directly to a specific treeview row.

Offline

#7 2020-11-19 03:50:22

hrqmonteiro
Member
Registered: 2020-11-18
Posts: 5

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

ToZ wrote:

I don't see a way that this is possible. There is no class assigned those "headers" and I don't see a way the CSS can be targeted directly to a specific treeview row.

I see.
And correct me if i'm wrong, but as i tested and as far as i'm concerned, the pseudo elements or classes like ":nth-child", ":after" and ":before" don't seem to work with gtk3, right? That would be nice if worked..

Offline

#8 2020-11-19 11:54:33

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,124

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

Yeah, you would think it work. But I can't seem to figure out how. You could try asking the developers at the #xfce-dev IRC channel or through the xfce4-dev mailing list.

Offline

#9 2020-11-19 13:31:03

hrqmonteiro
Member
Registered: 2020-11-18
Posts: 5

Re: [Thunar] How to customize Thunar classes on gtk3 theme?

ToZ wrote:

Yeah, you would think it work. But I can't seem to figure out how. You could try asking the developers at the #xfce-dev IRC channel or through the xfce4-dev mailing list.

Oh, thanks, i will try that.

Offline

Board footer

Powered by FluxBB