[maemo-developers] Fremantle UI Portrait Mode

From: Ross Burton ross at burtonini.com
Date: Sat May 30 14:04:37 EEST 2009
On Sat, 2009-05-30 at 12:47 +0200, Murray Cumming wrote:
> And most custom application layouts would need a different layout for
> portrait mode. The GTK+ box model can't know that you suddenly want the
> buttons in a hbox on the bottom instead of in a vbox on the right.

Some time ago I wrote a "magic" paned container which laid its children
out like a GtkHPaned or GtkVPaned depending on the allocation it has
been given.  It worked surprisingly well for the classic use case of a
paned where you have a list of objects in one side and details of the
selected object in the other.

http://svn.o-hand.com/repos/misc/trunk/libowl/libowl/owlpaned.c

A better solution would be for GtkPaned to be a concrete class and have
an orientation property, then a convenience function could monitor the
allocation and switch it on the fly (and work for other containers such
as GtkBox).

Ross
-- 
Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                           www: http://burtonini.com



More information about the maemo-developers mailing list