I have a window in a Vala application and an image inside it. This image is changed sometimes by
Code:
img.set_from_pixbuf(imgdata);
and so it's size changes as well. It's embedded in a Gtk.Box.
Code:
box = new Gtk.Box(Orientation.VERTICAL,5);
...
box.pack_end(img,false,false);
So if there was a big image before and I replace it with a smaller one, the window remains ridiculously big and I have not found a method to dynamically shrink it to the space required. I have tried with
Code:
window.set_default_size(box.width_request,box.height_request)
but it always returns -1.
So any ideas how to resize the window? I just tried everything and am so desperate. Thanks!