Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-12-24 00:45:26

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Panel buttons and gtk

I have a gtk setup for my panel and the Window Buttons to force my color choice. Just to frustrate myself I installed this some time ago, forgot about and then tried to change the colors of the panel in the panel-settings program ... and could not figure out why nothing changed smile Oh well...

Here is the line from my .config/gtk-3.0/gtk.css

.xfce4-panel, .xfce4-panel button { background-image: linear-gradient(to bottom, 
 shade(#80BCE0, .4), shade(#80CFF0, .6)); border: transparent; border-radius: 0; }  

I'm actually completely happy with this, expect that the buttons do not highlight the current active window name. Any fix for this?

Offline

#2 2022-12-24 02:34:30

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

Re: Panel buttons and gtk

You would target the following css node:

.tasklist button:checked {}

...or if you want to target the label of the current active window:

.tasklist button:checked label {}

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 2022-12-24 17:06:06

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: Panel buttons and gtk

ToZ wrote:

You would target the following css node:

.tasklist button:checked {}

...or if you want to target the label of the current active window:

.tasklist button:checked label {}

Thanks for the reply. However, I've tried the patches and cannot get either of them do do anything. I'm sure I'm doing it wrong smile

I'm using xfce4 4.16 and (I'm assuming) that it uses gtk-3.0.

I added both suggestions to the end of the line in my original file but found no difference at all. I also tried it as a newline, same null result.

Just as a recap (mostly for myself) the reason for all this is to get the background of various buttons in the panel the same color as the panel color. Maybe this is the wrong way to go about it all?

Offline

#4 2022-12-24 17:24:37

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

Re: Panel buttons and gtk

You need to add your color/gradient tweaks inside the curly brackets. So for example, to invert the gradient on the active button:

.tasklist button:checked { background-image: linear-gradient(to top,  shade(#80BCE0, .4), shade(#80CFF0, .6)); border: transparent; border-radius: 0;}

...or to change the text color to red:

.tasklist button:checked label { color: red }

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 2022-12-24 22:29:19

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: Panel buttons and gtk

And, indeed!, this works perfect!

Thanks again TOZ for coming up with a solution. Now I just have to find time to learn CSS smile

Offline

Board footer

Powered by FluxBB