c - Fetching gtk theme background color -


I'm almost a GTB NBB, and I'm exploring a way to get background color for the current theme. Then this code:

  GdkColor color = gtk_widget_get_style (main window) - & gt; BG [GTKADDNDMAR];  

The main window works only after the display, before it gives a weird ugly gray.

Try appending the "feel" signal to the widget and then the style information you want Hold it.

  Static Zero WidgetAligate (GtkWidget * widget) {GdkColor * color = NULL; GtkStyle * style = gtk_widget_get_style (widget); If (style! = Null) {color = style-> bg [GTK_STATE_NORMAL]; / * Whatever you want with it here * /}} Zero Fobre () {g_signal_connect (main windowHandle, "realize", GCLBack (widget_realized_cb), NULL); }  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -