summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-21 23:54:17 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-21 23:54:17 +0100
commit2c9405b92fb47c1faa341538bc0a7ac1aa46e4f6 (patch)
tree4d04d0b4ea724de300f750becffd3836e0bd4d06 /src
parent949096d0c0faa50cdb867f8a4b1766c52f750431 (diff)
fix preload of e icon when already loaded to show new icon
didn't stack right always. had if (x) not if (!x) ...
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_icon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/e_icon.c b/src/bin/e_icon.c
index f736a5e0f..342ea11f3 100644
--- a/src/bin/e_icon.c
+++ b/src/bin/e_icon.c
@@ -86,7 +86,7 @@ _e_icon_obj_prepare(Evas_Object *obj, E_Smart_Data *sd)
86{ 86{
87 if (!sd->obj) return; 87 if (!sd->obj) return;
88 88
89 if (sd->edje) 89 if (!sd->edje)
90 { 90 {
91 Evas_Object *pclip; 91 Evas_Object *pclip;
92 92
@@ -97,6 +97,7 @@ _e_icon_obj_prepare(Evas_Object *obj, E_Smart_Data *sd)
97 evas_object_image_scale_hint_set(sd->obj, 97 evas_object_image_scale_hint_set(sd->obj,
98 EVAS_IMAGE_SCALE_HINT_STATIC); 98 EVAS_IMAGE_SCALE_HINT_STATIC);
99 evas_object_smart_member_add(sd->obj, obj); 99 evas_object_smart_member_add(sd->obj, obj);
100 evas_object_stack_below(sd->obj, sd->eventarea);
100 evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED, 101 evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED,
101 _e_icon_preloaded, obj); 102 _e_icon_preloaded, obj);
102 evas_object_clip_set(sd->obj, pclip); 103 evas_object_clip_set(sd->obj, pclip);
@@ -236,7 +237,7 @@ e_icon_file_key_set(Evas_Object *obj, const char *file, const char *key)
236 if (sd->preload) 237 if (sd->preload)
237 { 238 {
238 sd->loading = 1; 239 sd->loading = 1;
239 evas_object_image_preload(sd->obj, 0); 240 evas_object_image_preload(sd->obj, EINA_FALSE);
240 } 241 }
241 else if (evas_object_visible_get(obj)) 242 else if (evas_object_visible_get(obj))
242 evas_object_show(sd->obj); 243 evas_object_show(sd->obj);
@@ -317,8 +318,9 @@ e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
317 edje_object_file_set(sd->obj, file, part); 318 edje_object_file_set(sd->obj, file, part);
318// if (edje_object_load_error_get(sd->obj) != EDJE_LOAD_ERROR_NONE) 319// if (edje_object_load_error_get(sd->obj) != EDJE_LOAD_ERROR_NONE)
319// return EINA_FALSE; 320// return EINA_FALSE;
320 if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
321 evas_object_smart_member_add(sd->obj, obj); 321 evas_object_smart_member_add(sd->obj, obj);
322 evas_object_stack_below(sd->obj, sd->eventarea);
323 if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
322 _e_icon_smart_reconfigure(sd); 324 _e_icon_smart_reconfigure(sd);
323} 325}
324 326
@@ -414,6 +416,7 @@ e_icon_image_object_set(Evas_Object *obj, Evas_Object *o)
414 sd->loading = 0; 416 sd->loading = 0;
415 sd->obj = o; 417 sd->obj = o;
416 evas_object_smart_member_add(sd->obj, obj); 418 evas_object_smart_member_add(sd->obj, obj);
419 evas_object_stack_below(sd->obj, sd->eventarea);
417 if (evas_object_visible_get(obj)) evas_object_show(sd->obj); 420 if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
418 _handle_anim(sd); 421 _handle_anim(sd);
419 _e_icon_smart_reconfigure(sd); 422 _e_icon_smart_reconfigure(sd);