On Wed, May 19, 2010 at 4:27 PM, Alberto Garcia <agar...@igalia.com> wrote:
> On Mon, Mar 01, 2010 at 05:57:45PM +0100, Luca Donaggio wrote: > > > Which is the best way to resize widgets inside a PannableArea? > > I'm writing a callback function to be called when the device > > orientation changes and I noticed that PannableAreas retain their > > former width, so widgets inside aren't resized (for example, > > gtkLabels don't wrap their content). > > gtk_widget_queue_resize() should be enough. > > (we're considering fixing this directly in Maemo-GTK btw) > > Berto > _______________________________________________ > maemo-developers mailing list > maemo-developers@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > Thanks Berto! This is the code I came up with in the meantime: I call this function from a callback which in turn is fired when a device orientation change is detected. Python code: ''' Recursively resize widgets ''' def __resize_widgets(self,widget): if gobject.type_is_a(widget,'GtkContainer'): for contwid in widget.get_children(): self.__resize_widgets(contwid) else: widget.queue_resize() -- Luca Donaggio
_______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers