evas box layout bugfix.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 3 Apr 2012 17:03:47 +0000 (17:03 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 3 Apr 2012 17:03:47 +0000 (17:03 +0000)
Due typo the weight was being handled as an integer, not floating
point. It worked with examples since they were usually being round to
int after being sum (0.3 + 0.7 -> 1.0, 3 + 7 -> 10).

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@69910 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/canvas/evas_object_box.c

index bc4ec30..7bf3866 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
         * Add evas_object_ref_get() to be able to tell if others ref
         an object.
 
+2012-04-03  Gustavo Sverzut Barbieri (k-s)
+
+       * Box layouts: fix handling of weights that have decimal parts,
+       they were being handled as "int" where "double" was expected.
index 228d37c..8dda42a 100644 (file)
@@ -691,7 +691,7 @@ _sizing_eval(Evas_Object *obj)
 }
 
 static int
-_evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, int weight_total)
+_evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, double weight_total)
 {
    int rem_diff = 0;
    int i;
@@ -849,7 +849,7 @@ evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, vo
 }
 
 static int
-_evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, int weight_total)
+_evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, double weight_total)
 {
    int rem_diff = 0;
    int i;