Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-01-12 07:53:45

Von_Kossa
Member
Registered: 2011-02-14
Posts: 7

[Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

Hi!

I recently migrated to Xfce4-panel 4.13.4, and everything works well except that iḿ trying to change the font color on the panel.
Iḿ running gentoo with gtk+ 3.24 and have tried to put the following code in the gtk.css file:


.xfce4-panel    {
    color: #ffffff;
}

I have put the gtk.css file in the following places without success:
./config/gtk-3.0/gtk.css
/etc/gtk-3.0/gtk.css

Iḿ going nuts here, what do i do wrong?
Either the syntax is wrong in 3.24 or for some strange reason it doesnt read the gtk.css file.

Thanks in advance.

Last edited by Von_Kossa (2019-01-12 18:09:44)

Offline

#2 2019-01-12 12:31:44

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,237

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

From https://developer.gnome.org/gtk3/stable … rties.html:

The color property specifies the color to use for text, icons and other foreground rendering.

So changing the color value will change more than just the font color.

Referencing just the .xfce4-panel class itself won't help since the color value won't affect it - you want to affect everything underneath it. The simple answer is:

.xfce4-panel * {
    color: #ffffff;
}

...but as you see, it will affect more than just the font color.

If you want to direct a font color change towards a specific plugin, you'll need to tailor the tweak to that plugin. Some examples:

/* clock text color */
#clock-button { color: #ffffff }

/* tasklist (window buttons) label text color */
.tasklist>*>box { color: #ffffff }

Offline

#3 2019-01-12 13:14:33

Von_Kossa
Member
Registered: 2011-02-14
Posts: 7

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

Wonderful! Itś working. smile

It also maybe the clipman icon white! *lol*

Offline

#4 2019-01-12 13:18:40

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,237

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

Von_Kossa wrote:

It also maybe the clipman icon white! *lol*

You can reverse this via:

#xfce4-clipman-plugin { color: #ff0000 }

...and change "#ff0000" to any color that you want.

Offline

#5 2019-01-12 13:19:02

Von_Kossa
Member
Registered: 2011-02-14
Posts: 7

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

More specifically i want to make the "clock" plugin and the "action buttons" (log in/log out) plugins with white fonts.
How do i get the name for the plugin?

I noticed it also made the panel menus white, not exactly what i want.

Last edited by Von_Kossa (2019-01-12 13:19:47)

Offline

#6 2019-01-12 13:26:37

Von_Kossa
Member
Registered: 2011-02-14
Posts: 7

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

Well, the clock is of course "clock-button" like you wrote above but the action buttons i don´t know.

Offline

#7 2019-01-12 13:27:31

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,237

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

Von_Kossa wrote:

How do i get the name for the plugin?

To find the names of the CSS style classes, you can use the GTK Inspector. To use it, first quit the panel:

xfce4-panel -q

...the start it in inspector mode:

GTK_DEBUG=interactive xfce4-panel

More specifically i want to make the "clock" plugin and the "action buttons" (log in/log out) plugins with white fonts.

For the clock, as mentioned above, use:

#clock-button { color: #ffffff }

For the actions plugin, assuming its the username that is being displayed, use:

#actions-button { color: #ffffff }

I noticed it also made the panel menus white, not exactly what i want.

Yes.

ToZ wrote:

...but as you see, it will affect more than just the font color.

That's why you need to identify the specific plugins that you want to effect and tweak them.

Offline

#8 2019-01-12 13:30:00

Von_Kossa
Member
Registered: 2011-02-14
Posts: 7

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

That did fix it! smile
Thank you for your help.

I think many people will want to know this when they migrate to gtk3, maybe make this post sticky?

Offline

#9 2019-01-12 13:48:02

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,237

Re: [Solved] xfce4-panel-4.13.4 (gtk3) cannot change font color

Von_Kossa wrote:

I think many people will want to know this when they migrate to gtk3, maybe make this post sticky?

We'll need more than a sticky post. This is only the tip of the iceberg. There are many posts in this forum on GTK3 theming of Xfce. And since Xfce is still in development, many of those are changing. When Xfce 4.14 is released an effort will need to be made to document these theming parameters.

Offline

Board footer

Powered by FluxBB