From 133937ed6d0b148f424b1c4ebca1de60db12ec89 Mon Sep 17 00:00:00 2001 From: Seunggyun Kim Date: Thu, 19 Jul 2012 08:10:02 +0000 Subject: [PATCH] From: Seunggyun Kim Subject: [E-devel] [PATCH] elm_icon is disappeared when theme hook is called. [Current Issue] - The elm_icon can be disappeared when theme hook is called. You can see the problem in the below situation. a) elementary_test -> Layout select b) elementary_config -> Fonts(toolbar) -> select some font class, font, style, size c) Select "Apply" button then two icons in title layout are disappeared. [Main cause] - when theme hook is called, internally _elm_image_smart_sizing_eval function is called. The function calculates icon's min, max size. But min, max size is calculated only in case no_scale is true or resize_down or resize_up is false. If application isn't set no_scale or resize_down/up, minw and minh value is just -1. So when theme hooks is called then sizing_eval is called, icon's min size is -1 and that is disappeared. [Change Description] - I just added evas_object_size_hint_min_get(obj, &minw, minh) in _elm_image_smart_sizing_eval. Patch is working well, but I don't think this is right solution because that would break image(icon) min,max concept SVN revision: 74163 --- legacy/elementary/src/lib/elm_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_image.c b/legacy/elementary/src/lib/elm_image.c index fcb99bf8ef..910baebc2c 100644 --- a/legacy/elementary/src/lib/elm_image.c +++ b/legacy/elementary/src/lib/elm_image.c @@ -789,7 +789,8 @@ _elm_image_smart_sizing_eval(Evas_Object *obj) sd->scale = 1.0; ELM_IMAGE_CLASS(ELM_WIDGET_DATA(sd)->api)->size_get(obj, &w, &h); sd->scale = ts; - + evas_object_size_hint_min_get(obj, &minw, &minh); + if (sd->no_scale) { maxw = minw = w;