Sebastian Werner wrote:

Am 22.08.2008 um 20:03 schrieb Chris Banford:


Assuming I can get this layout to a usable stage, what are the requirements for such a beast?

This is what I can think of off-hand:

    * The layout should respect any padding added to the elements it
      manages.

That's automatically done for you. This is part of each widget :)

Whoops -- sorry, I meant margin and not padding (bit short on sleep the last days, and brain is fuzzier than normal).

What you need to support for a full-supported layout is margins and alignments (all of them are implemented through LayoutItem) and should be respected by every layout.

Will go dig around in LayoutItem and see if I can figure it out from some of the many other layouts...


In a flow layout only alignY makes sense as the x-position is given through the flow. AlignY can move the widget in the area for this widget from top to bottom or in the middle etc. But I do not think that this is too important in a Flow Layout.

Yes, that's what I was also thinking. If I can get this working at all I'll be right impressed with myself! (no need for getting to complex by adding an alignX yet).


More interesting is the support for margins. There are a few helper methods for computing the sum of all gaps etc. in qx.ui.layout.Util, but I do not now how valid they are because of the floating to the next row.

A spacing property on the layout, not on the widgets, would also be a good idea. Often it's useful to have the same distance from each other applied to all widgets. This could be implemented as two properties: spacingX and spacingY. You can see it done this way in the "Dock" layout.

Just saw the spacing on other layouts after I posted. If I get the other bits to work, will try the spacing too. As the other layouts are so clean and simple, its really quite easy to pull out the related bits, once one has grokked how things fit together.


    * Each wrap of elements should to a new 'row' should clear all
      elements above it (see how button #6 drops under button #3 in
      the attached screen shot).
    * Left, Right & Center alignment of the flow.


Do you mean alignX for the whole flow layout? This maybe an option. The HBox allows the same.

Yup alignX it is! :-) .

Really fun to be learning this stuff, and also have the (small) possibility to contribute something already. Very cool indeed.

-Chris














-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to