c - How can I make scalable GTK_IMAGE -


I have to display an image inside the window that changes the window size by the user. I have tried to use the size-allocated event like this:

  Fixed gabolian allocation (GtkWidget * w, GtkAllocation * a, char * data) {/ * pix. Is * / Gtk_image_set_from_pixbuf (GTK_IMAGE (picture), px); / * Scale_image scales the picksbuff of GTK_IMAGE while keeping the height / / scale_image (GTK_IMAGE (image), A-> the width, A-> height;} the description is false;}   

In the main:

  g_signal_connect (G_OBJECT (window), "size-allocation", gcolblack (alaukack), null);   

It only works when you make it big, but you can not shorten its estimation because the image has been allocated size. I could only use the width -100 or something else but There is a better way to breathe.Another thing that does not work in my solution is going back to the maximum window, I would like to go back to the size where it was maximized Now it simply prevents the window But the image is still the same width and height so that the window creates the same width and height with the image

Is anyone having a good solution?

Zhe found I had to put only the image in a scrollable window solution

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -