I have noticed that i can only change the foreground color of a gtk2.0 theme button with the "default" style.
I did it like:
style "default" {
fg[NORMAL] = "#000000"
fg[PRELIGHT] = "#000000"
fg[SELECTED] = "#000000"
fg[INSENSITIVE] = "#000000"
fg[ACTIVE] = "#000000"
}
class "GtkWidget" style "default"
style "button" {
fg[NORMAL] = "#FF0000"
fg[ACTIVE] = "#FF0000"
fg[PRELIGHT] = "#FF0000"
fg[INSENSITIVE] = "#FF0000"
}
widget_class "*GtkText" style "button"
class "GtkButton" style "button"
widget_class "*GtkButton*" style "button"
The 3 assignments are to test if any work but the button text and all the other text color are black how it is defined within the "default" style.
I tried to look if a foreground color can be changed in other widgets and it does.
For a list view i could change the foreground color of the header columns (where i can sort the list)
If i change the fg[NORMAL] within the default style to "#FF0000" the button will get red like expected but also any other text too which is also expected.
Can anybody tell me how i can change only the foreground color of a gtk2.0 button?
EDIT I forgot to tell that if i change the background image using pixmap engine the background images appeared so the "style assignation" work well but the fg color will not be overridden.
Edit To provide you more information:
I have installed the latest gtk3 and gtk2 libs/engines (apt-get upgrade)
Also i tried (additional to the gtk2.0 theme settings) the gtk3.0 settings for the css selector:
button,
GtkButton,
button.default,
GtkButton.default,
button *,
GtkButton *
button.default *,
GtkButton.default *,
{
color: #FF0000;
}
button:hover,
GtkButton:hover,
button:hover *,
GtkButton:hover *,
button.default:hover,
GtkButton.default:hover,
button.default:hover *,
GtkButton.default:hover *
{
color: #FF0000;
}
button:active,
GtkButton:active,
button:active *,
GtkButton:active *,
button.default:active,
GtkButton.default:active,
button.default:active *,
GtkButton.default:active *
{
color: #FF0000;
}
button:hover:active,
GtkButton:hover:active,
button:hover:active *,
GtkButton:hover:active *,
button.default:hover:active,
GtkButton.default:hover:active,
button.default:hover:active *,
GtkButton.default:hover:active *
{
color: #FF0000;
}
This also has no effects.
My System is
- Ubuntu 12.04
- Gnome3 classic mode with effects
- WindowManager: emerald