You are not logged in.
Hello,
I'm using XFCE4 with default Adwaita theme and across all the applications tooltips have black background. In order to change the tooltip's background color to something else I added to the ~/.config/gtk-3.0/gtk.css file the following content:
@define-color base_color #ffffff;
@define-color tooltip_bg_color #00ff00;
@define-color tooltip_fg_color #ff0000;
@define-color theme_tooltip_bg_color @tooltip_bg_color;
@define-color theme_tooltip_fg_color @tooltip_fg_color;
.tooltip {
padding: 5px 5px 5px 5px;
margin: 0px 0px 0px 0px;
border-width: 1px;
border-style: solid;
border-radius: 0px;
border-color: #ffffff;
background-image: none;
background-color: #ffffff;
color: #454545;
border: 0px;
}
.tooltip * {
background-color: #ffffff;
font-weight: bold;
padding: 5px 5px 5px 5px;
margin: 0px 0px 0px 0px;
border-width: 1px;
border-style: solid;
border-color: @tooltip_bg_color;
color: #454545;
text-shadow: 5px 5px 3px #bbbbbb, 7px 7px 3px #ccccFF;
}
But this hasn't changed anyting. What is the correct way to change the tooltip's background in GTK 3.0?
Last edited by nbd (2017-06-24 05:25:34)
bing different
Offline
XFCE still uses gtk2 (at least the majority of XFCE applications). You can edit your .gtkrc-2.0 config file, tooltip_bg_color is the key that you are looking for.
Last edited by FlowIt (2017-06-23 21:17:54)
Offline
@FlowIt
I mentioned not only XFCE4 aplications, but all applications on my machine, including pure GTK3 ones: Firefox, Eclipse, LibreOffice, Gnome Calculator. They all have black tooltips.
Nonetheless, I added the following code to the ~/.gtkrc-2.0
gtk-color-scheme = "bg_color: #ffd7e7
fg_color: #000
base_color: #fff
text_color: #da2820
selected_bg_color: #4c4c4c
selected_fg_color: #fff
tooltip_bg_color: #e5e5e5
tooltip_fg_color: #000000"
This hasn't changed anything.
bing different
Offline
Actually, editing ~/.gtkrc-2.0 changed tooltips in GTK2 applications. But not in GTK3 applications. Isn't GTK3 honoring user's ~/.config/gtk-3.0/gtk.css settings anymore? If so, is there a way for the user to customize themes in GTK3.0 without creating it's own one?
bing different
Offline
As I understand it, prefixing "tooltip" with a "." refers to a style class by that name (if its defined). Leaving out the "." references the GTKTooltip widget itself. Also, prepending with a "#", references the actual widget name. So, if you used:
tooltip {
...
}
...you should be able to affect the tooltips.
Offline
toz, many thanks!
bing different
Offline