c - GtkButton just shows text but no image -


i have gtkbutton inside gtkhbuttonbox doesn't show image i'm adding it. shows text. here's code:

gtkimage *image = (gtkimage *) gtk_image_new_from_file("gateway-lt21-netbook-2-540x359"); gtkbutton *button = (gtkbutton *) gtk_button_new_with_label("test"); gtk_button_set_image(button, (gtkwidget *) image); 

is there i'm missing?

make sure "gtk-button-images" setting set true.

gtksettings *default_settings = gtk_settings_get_default(); g_object_set(default_settings, "gtk-button-images", true, null);  

note: should follow construction of first window (and of course precede main loop).

if i'm not mistaken, rather recent change in gnome - reason, decided icons not appear on buttons default (this seems apply standard ms windows theme).


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -