diff options
author | Neil Roberts <neil@linux.intel.com> | 2010-09-20 12:04:51 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2010-09-20 16:35:53 +0100 |
commit | 632c7e8a37ed444f79014b2a25313c7ecd85f31e (patch) | |
tree | 491cd5459b28aaca16024842bf870426885213b8 | |
parent | 813a2046b29024bb12550b52694cccfedd302062 (diff) | |
download | clutter-632c7e8a37ed444f79014b2a25313c7ecd85f31e.tar.gz |
clutter-box-layout: Swap the default request mode
The request mode set by the box layout was previously width-for-height
in a vertical layout and height-for-width in a horizontal layout which
seems to be wrong. For example, if width-for-height is used in a
vertical layout then the width request will come second with the
for_height parameter set. However a vertical layout doesn't pass the
for_height parameter on to its children so doing the requests in that
order doesn't help. If the layout contains a ClutterText then both the
width and height request for it will have -1 for the for_width and
for_height parameters so the text would end up allocated too small.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2328
(cherry picked from commit 8f4d61e663770d6a24b75d77418a145eba7c104f)
-rw-r--r-- | clutter/clutter-box-layout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clutter/clutter-box-layout.c b/clutter/clutter-box-layout.c index 121dde3c4..34d29c6da 100644 --- a/clutter/clutter-box-layout.c +++ b/clutter/clutter-box-layout.c @@ -555,9 +555,9 @@ clutter_box_layout_set_container (ClutterLayoutManager *layout, /* we need to change the :request-mode of the container * to match the orientation */ - request_mode = (priv->is_vertical) - ? CLUTTER_REQUEST_WIDTH_FOR_HEIGHT - : CLUTTER_REQUEST_HEIGHT_FOR_WIDTH; + request_mode = (priv->is_vertical + ? CLUTTER_REQUEST_HEIGHT_FOR_WIDTH + : CLUTTER_REQUEST_WIDTH_FOR_HEIGHT); clutter_actor_set_request_mode (CLUTTER_ACTOR (priv->container), request_mode); } |