You are not logged in.
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
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 }
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
Wonderful! Itś working.
It also maybe the clipman icon white! *lol*
Offline
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.
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
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
Well, the clock is of course "clock-button" like you wrote above but the action buttons i don´t know.
Offline
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.
...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.
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
That did fix it!
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
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.
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
In particular it took me quite a while to figure out that custom CSS properties (i.e., the ones added in the application's code) must be prefixed with -[WIDGET_CLASS_NAME]- to be recognized. So for example, what used to be
style "my-xfce-tasklist-style"
{
XfceTasklist::max-button-size = 72
}
class "XfceTasklist" style "my-xfce-tasklist-style"
in .gtkrc-2.0 should in .config/gtk-3.0/gtk.css become
.tasklist {
-XfceTasklist-max-button-size:72;
}
This should definitely be clearly laid out in the upcoming documentation for 4.14. Thanks!
(Also, not sure if this is likely to be read by any developers, but while tracking this down I noted that the tasklist code still uses the "style_set" signal, which is deprecated in gtk 3; it should be replaced by "style_updated".)
Offline
In particular it took me quite a while to figure out that custom CSS properties (i.e., the ones added in the application's code) must be prefixed with -[WIDGET_CLASS_NAME]- to be recognized. So for example, what used to be
style "my-xfce-tasklist-style" { XfceTasklist::max-button-size = 72 } class "XfceTasklist" style "my-xfce-tasklist-style"
in .gtkrc-2.0 should in .config/gtk-3.0/gtk.css become
.tasklist { -XfceTasklist-max-button-size:72; }
This should definitely be clearly laid out in the upcoming documentation for 4.14. Thanks!
And thanks to you - I didn't know that you could use the widget name for these properties - though it makes a lot of sense.
(Also, not sure if this is likely to be read by any developers, but while tracking this down I noted that the tasklist code still uses the "style_set" signal, which is deprecated in gtk 3; it should be replaced by "style_updated".)
You should consider creating a bug report to bring it to the developer's attention. Better to fix it now rather than when GTK3 developers remove the code and leave us hanging.
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
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 584.95 KiB (Peak: 601.79 KiB) ]