summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 15:23:50 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 15:24:37 +0900
commite8b7f5f255ce37fbc47dbe38bd379bf1e824e0d2 (patch)
treeb63ae975a660a7783592733f2086431b35f4689c
parent29bacf59887b5b47f08a68c5c7b20647f8dd244f (diff)
evas: Set default align to FILL for EO objects
See also 1a1b8bc45155dcb96129013c4177d742a06434e6
-rw-r--r--src/lib/evas/canvas/evas_object_main.c6
-rw-r--r--src/lib/evas/include/evas_private.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 794dc4a105..a237da4ea4 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -210,6 +210,9 @@ _efl_canvas_object_efl_object_finalize(Eo *eo_obj, Evas_Object_Protected_Data *o
210 if (!obj->legacy.weight_set) 210 if (!obj->legacy.weight_set)
211 efl_gfx_size_hint_weight_set(eo_obj, 1.0, 1.0); 211 efl_gfx_size_hint_weight_set(eo_obj, 1.0, 1.0);
212 212
213 if (!obj->legacy.align_set)
214 efl_gfx_size_hint_align_set(eo_obj, -1.0, -1.0);
215
213 if (obj->legacy.visible_set /* && ... */) 216 if (obj->legacy.visible_set /* && ... */)
214 { 217 {
215 obj->legacy.finalized = EINA_TRUE; 218 obj->legacy.finalized = EINA_TRUE;
@@ -1605,6 +1608,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo *eo_obj, Evas_Object_Prot
1605 if (obj->delete_me) 1608 if (obj->delete_me)
1606 return; 1609 return;
1607 evas_object_async_block(obj); 1610 evas_object_async_block(obj);
1611 if (!obj->legacy.align_set) obj->legacy.align_set = 1;
1608 if (EINA_UNLIKELY(!obj->size_hints)) 1612 if (EINA_UNLIKELY(!obj->size_hints))
1609 { 1613 {
1610 if (EINA_DBL_EQ(x, 0.5) && EINA_DBL_EQ(y, 0.5)) return; 1614 if (EINA_DBL_EQ(x, 0.5) && EINA_DBL_EQ(y, 0.5)) return;
@@ -1635,10 +1639,10 @@ _efl_canvas_object_efl_gfx_size_hint_hint_weight_get(Eo *eo_obj EINA_UNUSED, Eva
1635EOLIAN static void 1639EOLIAN static void
1636_efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double x, double y) 1640_efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double x, double y)
1637{ 1641{
1638 obj->legacy.weight_set = 1;
1639 if (obj->delete_me) 1642 if (obj->delete_me)
1640 return; 1643 return;
1641 evas_object_async_block(obj); 1644 evas_object_async_block(obj);
1645 if (!obj->legacy.weight_set) obj->legacy.weight_set = 1;
1642 if (EINA_UNLIKELY(!obj->size_hints)) 1646 if (EINA_UNLIKELY(!obj->size_hints))
1643 { 1647 {
1644 if (EINA_DBL_EQ(x, 0.0) && EINA_DBL_EQ(y, 0.0)) return; 1648 if (EINA_DBL_EQ(x, 0.0) && EINA_DBL_EQ(y, 0.0)) return;
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index eb504fc157..af5a08318f 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1262,6 +1262,7 @@ struct _Evas_Object_Protected_Data
1262 Eina_Bool ctor : 1; // used legacy constructor 1262 Eina_Bool ctor : 1; // used legacy constructor
1263 Eina_Bool visible_set : 1; // visibility manually set 1263 Eina_Bool visible_set : 1; // visibility manually set
1264 Eina_Bool weight_set : 1; // weight manually set 1264 Eina_Bool weight_set : 1; // weight manually set
1265 Eina_Bool align_set : 1; // align manually set
1265 Eina_Bool finalized : 1; // object fully constructed 1266 Eina_Bool finalized : 1; // object fully constructed
1266 } legacy; 1267 } legacy;
1267 1268