evas box layout bugfix.

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).



SVN revision: 69910
This commit is contained in:
Gustavo Sverzut Barbieri 2012-04-03 17:03:47 +00:00
parent a40ca4ab97
commit 2757e05a59
2 changed files with 6 additions and 2 deletions

View File

@ -681,3 +681,7 @@
* 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.

View 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;