summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-11 16:27:22 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-12 14:58:34 -0500
commit6822927988700570653827d5f2562c683660196e (patch)
tree2e8ed0d510fc6587f7bb8b98dc34a4347391a6c6
parentd176fbc8068309182f2924e371b9e52bb309f237 (diff)
elm_tooltip: force immediate hint recalc during tooltip creation if 0x0 size
try to avoid initial 0x0 sized tooltips @fix
-rw-r--r--src/lib/elementary/els_tooltip.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/elementary/els_tooltip.c b/src/lib/elementary/els_tooltip.c
index 4eaea65cf7..c87da888ec 100644
--- a/src/lib/elementary/els_tooltip.c
+++ b/src/lib/elementary/els_tooltip.c
@@ -426,6 +426,7 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
426 Evas_Coord eminw, eminh, ominw, ominh; 426 Evas_Coord eminw, eminh, ominw, ominh;
427 double rel_x = 0.0, rel_y = 0.0; 427 double rel_x = 0.0, rel_y = 0.0;
428 Eina_Bool inside_eventarea; 428 Eina_Bool inside_eventarea;
429 Eina_Bool new_content = EINA_FALSE;
429 430
430 _elm_tooltip_reconfigure_job_stop(tt); 431 _elm_tooltip_reconfigure_job_stop(tt);
431 432
@@ -520,8 +521,7 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
520 } 521 }
521 edje_object_part_swallow 522 edje_object_part_swallow
522 (tt->tooltip, "elm.swallow.content", tt->content); 523 (tt->tooltip, "elm.swallow.content", tt->content);
523 evas_object_event_callback_add(tt->content, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 524 new_content = EINA_TRUE;
524 _elm_tooltip_content_changed_hints_cb, tt);
525 evas_object_event_callback_add(tt->content, EVAS_CALLBACK_DEL, 525 evas_object_event_callback_add(tt->content, EVAS_CALLBACK_DEL,
526 _elm_tooltip_content_del_cb, tt); 526 _elm_tooltip_content_del_cb, tt);
527 527
@@ -530,6 +530,16 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
530 } 530 }
531 TTDBG("*******RECALC\n"); 531 TTDBG("*******RECALC\n");
532 evas_object_size_hint_combined_min_get(tt->content, &ominw, &ominh); 532 evas_object_size_hint_combined_min_get(tt->content, &ominw, &ominh);
533 /* force size hints to update */
534 if ((!ominw) || (!ominh))
535 {
536 evas_object_smart_need_recalculate_set(tt->content, 1);
537 evas_object_smart_calculate(tt->content);
538 evas_object_size_hint_combined_min_get(tt->content, &ominw, &ominh);
539 }
540 if (new_content)
541 evas_object_event_callback_add(tt->content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
542 _elm_tooltip_content_changed_hints_cb, tt);
533 edje_object_size_min_get(tt->tooltip, &eminw, &eminh); 543 edje_object_size_min_get(tt->tooltip, &eminw, &eminh);
534 544
535 if (eminw && (ominw < eminw)) ominw = eminw; 545 if (eminw && (ominw < eminw)) ominw = eminw;