mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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
This commit is contained in:
parent
699e8bbed2
commit
8f4d61e663
@ -477,9 +477,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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user