[clutter/wip/apocalypses/apocalypse-1: 31/43] flow-layout: Fix minimum size request
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/apocalypses/apocalypse-1: 31/43] flow-layout: Fix minimum size request
- Date: Wed, 7 Dec 2011 18:15:58 +0000 (UTC)
commit 30c8edb8120bc7a2096d8ea6112c25068dd00880
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Mon Dec 5 10:25:42 2011 +0000
flow-layout: Fix minimum size request
The minimum preferred size of a Flow layout manager is the size of a
column or a row, as the whole point of the layout policy enforced by
the Flow layout manager is to reflow when needed.
clutter/clutter-flow-layout.c | 4 ++--
tests/interactive/test-flow-layout.c | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/clutter/clutter-flow-layout.c b/clutter/clutter-flow-layout.c
index b1d9ac5..0f97f76 100644
--- a/clutter/clutter-flow-layout.c
+++ b/clutter/clutter-flow-layout.c
@@ -365,7 +365,7 @@ clutter_flow_layout_get_preferred_width (ClutterLayoutManager *manager,
priv->req_height = for_height;
if (min_width_p)
- *min_width_p = total_min_width;
+ *min_width_p = max_min_width;
if (nat_width_p)
*nat_width_p = total_natural_width;
@@ -542,7 +542,7 @@ clutter_flow_layout_get_preferred_height (ClutterLayoutManager *manager,
priv->req_width = for_width;
if (min_height_p)
- *min_height_p = total_min_height;
+ *min_height_p = max_min_height;
if (nat_height_p)
*nat_height_p = total_natural_height;
diff --git a/tests/interactive/test-flow-layout.c b/tests/interactive/test-flow-layout.c
index f055054..fa42583 100644
--- a/tests/interactive/test-flow-layout.c
+++ b/tests/interactive/test-flow-layout.c
@@ -72,8 +72,6 @@ test_flow_layout_main (int argc, char *argv[])
{
ClutterActor *stage, *box;
ClutterLayoutManager *layout;
- ClutterColor stage_color = { 0xe0, 0xf2, 0xfc, 0xff };
- ClutterColor box_color = { 255, 255, 255, 255 };
GError *error;
gint i;
@@ -92,7 +90,7 @@ test_flow_layout_main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_stage_set_title (CLUTTER_STAGE (stage), "Flow Layout");
- clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
+ clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_LightSkyBlue);
clutter_stage_set_user_resizable (CLUTTER_STAGE (stage), TRUE);
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
@@ -106,7 +104,7 @@ test_flow_layout_main (int argc, char *argv[])
y_spacing);
box = clutter_box_new (layout);
- clutter_box_set_color (CLUTTER_BOX (box), &box_color);
+ clutter_box_set_color (CLUTTER_BOX (box), CLUTTER_COLOR_Aluminium2);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), box);
if (!fixed_size)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]