summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-11-02 11:16:57 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-11-18 11:40:42 -0500
commitad1b8f224f3dd189d6129da9c43c13a6810949c6 (patch)
treefdafde488873c2fe424952f2650c177f2ade9944
parentef2112c7dbdb9a3b9a7b8c5531c024333d6fbe90 (diff)
force gadget site recalc from style object if gadget's hints change
ensure that these intermediate objects trigger recalcs as expected fix T4809
-rw-r--r--src/bin/e_gadget.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index 4f0c378ec..54b36ae92 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -1488,6 +1488,13 @@ e_gadget_type_iterator_get(void)
1488 return gadget_types ? eina_hash_iterator_key_new(gadget_types) : NULL; 1488 return gadget_types ? eina_hash_iterator_key_new(gadget_types) : NULL;
1489} 1489}
1490 1490
1491static void
1492_gadget_style_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1493{
1494 E_Gadget_Config *zgc = data;
1495 evas_object_smart_need_recalculate_set(zgc->site->layout, 1);
1496}
1497
1491E_API Evas_Object * 1498E_API Evas_Object *
1492e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style) 1499e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
1493{ 1500{
@@ -1522,6 +1529,7 @@ e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
1522 elm_box_unpack(zgc->site->layout, prev); 1529 elm_box_unpack(zgc->site->layout, prev);
1523 } 1530 }
1524 evas_object_raise(zgc->site->events); 1531 evas_object_raise(zgc->site->events);
1532 evas_object_event_callback_del(prev, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _gadget_style_hints);
1525 if (!style) return prev; 1533 if (!style) return prev;
1526 1534
1527 evas_object_data_set(style, "__e_gadget", zgc); 1535 evas_object_data_set(style, "__e_gadget", zgc);
@@ -1529,6 +1537,7 @@ e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
1529 elm_layout_sizing_eval(style); 1537 elm_layout_sizing_eval(style);
1530 evas_object_smart_calculate(style); 1538 evas_object_smart_calculate(style);
1531 evas_object_size_hint_min_get(style, &zgc->style.minw, &zgc->style.minh); 1539 evas_object_size_hint_min_get(style, &zgc->style.minw, &zgc->style.minh);
1540 evas_object_event_callback_add(style, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _gadget_style_hints, zgc);
1532 evas_object_show(style); 1541 evas_object_show(style);
1533 evas_object_smart_callback_add(zgc->display, "gadget_popup", _gadget_popup, zgc->site); 1542 evas_object_smart_callback_add(zgc->display, "gadget_popup", _gadget_popup, zgc->site);
1534 return prev; 1543 return prev;