I am aware of the dynamics of GTK, but the need to render custom widgets to use a similar color palette to the current theme is a real one that does not seem to have an elegant solution. I know that as desktops get increasingly more gradient/texture based, the idea of a single defining background color gets more and more quaint, but this doesnt eliminate the need.
In the same vein, of colors, can someone explain what I am doing wrong when: gtk_style_context_get_background_color(context, GTK_STATE_FLAG_NORMAL, &bg_n); gives me nothing but black for the same widget that gtk_widget_get_style gives me the (expected) rgb (214,214,214) ?
I am trying to get general GTK system colors for use in custom rendering operations. In MSW, I would get these colors through a function like GetSysColor, but GTK does not appear to have such a function.The only way that comes to mind, to get a bunch of common system colors, is to create a bunch of widgets (one of each type that has a color I need), parent said widget, and make sure its realized, using gtk_style_context_get_color. This seems like an awful lot of overhead (and a bit overkill) just to get some colors. Am I missing some more direct method?I am using GTK3.
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list