Commit Graph

12 Commits

Author SHA1 Message Date
Emmanuele Bassi
dbec3be996 grid-layout: Clarify the scope of the orientation property
Just like GtkGrid, changing the orientation of a ClutterGridLayout does
not change the existing layout; the orientation property is only used as
a hint when adding new children.
2015-09-04 13:53:04 +01:00
Emmanuele Bassi
7ed96aabd8 grid: Use the proper orientation for the request mode
We automatically switch the request mode of the container depending on
the GridLayout's orientation, but we need to keep track of the request
mode during allocation, so that we don't get out of sync if the user
changed the request mode after adding the layout manager.

This change also brings us closer to the code in GtkGrid.
2015-09-03 14:18:33 +01:00
Emmanuele Bassi
dea5057fbd grid: Use the orientation of the request
We use the orientation of the grid to get the preferred size of the
layout, but we should be using the orientation of the request instead.
The preferred width has an orizontal orientation, and the preferred
height has a vertical orientation.

This allows us to refactor the get_preferred_* implementation into a
separate function.
2015-08-29 20:38:29 +01:00
Emmanuele Bassi
dac33c5fea Stop using macros for accessing actor state
Use the newly added functions instead.
2015-04-23 17:39:30 +01:00
Bastian Winkler
70835c904a grid-layout: Use correct orientation when requesting preferred child size
Otherwise width and height are swapped.

https://bugzilla.gnome.org/show_bug.cgi?id=725722
2014-03-12 00:30:40 +01:00
Emmanuele Bassi
41bb03da2d Use the new macros for adding private data 2013-07-03 18:04:32 +01:00
Jasper St. Pierre
039ba910f0 grid-layout: Don't use uninitialized values
The clutter_actor_box_set_* methods rely on the current box
geometry, so we can't use those for an uninitialize actor box.
Found by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:53 -05:00
Emmanuele Bassi
2fef1a174e grid-layout: Remove layout animations
ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Bastian Winkler
1bdd214811 grid-layout: Insert new rows/columns at the appropriate position 2012-06-12 23:50:44 +02:00
Bastian Winkler
7c8f761d43 grid-layout: Fix attach position for horizontal orientation
Switch the attach position. A new child should be positioned right of
it's previous sibling in ltr mode.
2012-06-12 23:50:44 +02:00
Emmanuele Bassi
7118bab23c docs: Change GridLayout's short description
Clutter doesn't have widgets.
2012-06-11 10:02:38 +01:00
Bastian Winkler
1eb869ec8f Add ClutterGridLayout
ClutterGridLayout is port of GtkGrid to a Clutter layout manager. All
the logic is taken from gtkgrid.c, so all the credits should go to
Matthias Clasen for writing this nice piece of code.

ClutterGridLayout supports adding children with it's own methods
GridLayout.attach() and GridLayout.attach_next_to() as well as
Actor.add_child() and friends. The latter adds children in a similar
fashion to ClutterBoxLayout

https://bugzilla.gnome.org/show_bug.cgi?id=677372
2012-06-05 12:28:25 +02:00