Commit Graph

15 Commits

Author SHA1 Message Date
Emmanuele Bassi
aba6c5acc7 flow-layout: Provide a preferred size
The FlowLayout fails to provide a preferred size in case no sizing is
specified on one axis. It should, instead, have the preferred size of
the sum of its children, depending on the orientation property.

http://bugzilla.openedhand.com/show_bug.cgi?id=2013
2010-03-02 15:11:27 +00:00
Emmanuele Bassi
d2bdd3cb62 Fix some compiler warnings
GCC complains that some variable might be used uninitialized.
2010-02-09 16:58:03 +00:00
Bastian Winkler
18860eb16f flow-layout: Use the natural size
Fix a copy-and-paste thinko where the cell size was computed using the
minimum size instead of the natural size. For actors with a minimum size
of zero, like Textures, this implied always a zero allocation.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-12-03 15:38:05 +00:00
Rob Bradford
cdba8cc220 flow-layout: Include the first line when calculating number of lines
This ensures that the preferred height / width height takes into consideration
the correct amount of padding
2009-12-01 17:46:12 +00:00
Rob Bradford
c564303601 flow-layout: Respect row-spacing/col-spacine in horizontal/vertical flows
We need to add the row-spacing value when calculating the y position for lines
of actors in horizontal flowing layouts.

Similarly we need to add the col-spacing value when calculating the x posution
for actors in vertical flowing layouts.
2009-12-01 17:46:11 +00:00
Emmanuele Bassi
f0b434918b docs: Add images for layout managers
It's easier to show the layout manager policy with a simple
screen shot coming from our interactive tests.
2009-10-23 17:32:18 +01:00
Emmanuele Bassi
308c930f37 layout, docs: Add long description for FlowLayout
Add the full description of the layout policy
2009-10-15 14:11:36 +01:00
Emmanuele Bassi
c4b2d4ce79 layout: Report the correct size of FlowLayout
FlowLayout should compute the correct height for the assigned width when
in horizontal flow, and the correct width for the assigned height when
in vertical flow. This means pre-computing the number of lines inside
the get_preferred_width() and get_preferred_height(). We can then cache
the computed column width and row height, cache them inside the layout
and then use them when allocating the children.
2009-10-14 11:31:35 +01:00
Emmanuele Bassi
eb40e856e1 layout: Change the request-mode along with the orientation
When changing the orientation of a FlowLayout, the associated
container should also change its request mode. A horizontally
flowing layout has a height depending on the width, since it
will reflow vertically; similarly, a vertically reflowing layout
will have a width depending on the height.
2009-10-14 11:31:31 +01:00
Emmanuele Bassi
19317520b5 [layout] Remove FlowLayout:wrap
The :wrap property is not implemented, and mostly useless: the
FlowLayout is a reflowing grid. This means that if it receives
less than the preferred width or height in the flow direction
then it should always reflow.
2009-10-14 11:31:30 +01:00
Emmanuele Bassi
4ea57bc685 [layout] Skip invisible children in FlowLayout
Skip hidden actors when computing the preferred size and when
allocating.
2009-10-14 11:31:30 +01:00
Emmanuele Bassi
b1bae4d66a [layout] Clean up and document FlowLayout 2009-10-14 11:31:30 +01:00
Emmanuele Bassi
db3ef97170 [layout] Snap children of FlowLayout to column/row
Use the column and row size to align each child; with :homogeneous
set to TRUE, or with children with the same size, the FlowLayout
will behave like a reflowing grid.
2009-10-14 11:31:30 +01:00
Emmanuele Bassi
e5a074fd9e [layout] Add :homogeneous to FlowLayout 2009-10-14 11:31:30 +01:00
Emmanuele Bassi
5737cf869f [layout] Initial implementation of FlowLayout
FlowLayout is a layout manager that arranges its children in a
reflowing line; the orientation controls the major axis for the
layout: horizontal, for reflow on the Y axis, and vertical, for
reflow on the X axis.
2009-10-14 11:31:30 +01:00