Context
In GTK 3, people can set their own themes. Even the default theme (Adwaita) has two options: light and dark. Since I am writing my own widget (in python), I need to get these colors in order to avoid draft on black or white white.
Question
How can I access the default colors for a GTK user theme?
Things that don't work
GtkSettings used for provides an acceptable property gtk-theme-color, but it is no longer there, and there is no reference in the document to an explanation of how to replace it.- I do not want to get this color from another widget:
Why don't I want to copy the style from another widget?
Because the pristine color is out there somewhere. I do not see, in principle, why I should be forced to indirectly refer to it.
Also, how would you react if you crashed the program just because you dared to delete one tag somewhere? How would you react by changing the color of one label in fact, changing the color of other, completely unrelated widgets?
I do not want such surprises.
Johnw source
share