GtkImage problem with gtk_image_set_from_file
Hello
I used gtk_image_set_from_file but the image looks hazy, like beeing fogged. I don't understand why. Can anyone help me? |
I've only been using GTK for < one week, but I just use:
Code:
GtkWidget* gtk_image_new_from_file (const gchar *filename); |
The relevant code was
GtkWidget *pendul; pendul=gtk_image_new_from_file("foucoultmic.jpg"); gtk_widget_show (pendul); gtk_box_pack_start (GTK_BOX (hbox1), pendul, FALSE, FALSE, 3); gtk_widget_set_size_request (pendul, 200, 316); gtk_widget_set_sensitive (pendul, FALSE); It is generated by Glade. I used it to speed up things in designing my interface. I commented the last line (gtk_widget_set_sensitive (pendul, FALSE);) and now everything seems to be allright. The image is displayed as it should. I don't really need any more help but I would be curious if somebody may tell me why gtk_widget_set_sensitive (pendul, FALSE); makes the image look like being sorounded by a fog. You can try it too. Just add gtk_widget_set_sensitive (/*your widget*/, FALSE);. Why does it scramble my image? |
That is what sensitive does. I think sensitive means you can't select it, or rather, its read only. You'll see text sometimes that is sensitive, or grayed, like unusable menu items. Ya! Thats it! For menu items, pretend a menu item "Save" has a Save Disk image to the side of it, now if it is grayed, or sensitive, then the Save Disk image would be fogged also!
Thats why. |
All times are GMT -5. The time now is 04:59 AM. |