Fixed the icon resizable if the size over SIZE_ICON_MAX 54/44954/2
authorHyojung Jo <hj903.jo@samsung.com>
Thu, 30 Jul 2015 05:37:12 +0000 (14:37 +0900)
committerHyojung Jo <hj903.jo@samsung.com>
Thu, 30 Jul 2015 05:41:37 +0000 (14:41 +0900)
Change-Id: I86e1cf19c1a94ce9c3eca23fe42ee9128a074694
Signed-off-by: Hyojung Jo <hj903.jo@samsung.com>
include/define.h
res/widget/gengrid.edc
src/grid/grid_myapps.c

index 887b7fed5644769d13adbb2197db3fa615dcc5eb..617ecd2a075df9c9cb3e9238df24e6da238d45f5 100644 (file)
@@ -94,6 +94,7 @@
 #define SIZE_MENU_BOX_PAD_V 0
 #define SIZE_SORT_BOX_PAD_H 0
 #define SIZE_SORT_BOX_PAD_V 0
+#define SIZE_ICON_MAX 100
 
 /* Image */
 #define DEFAULT_APP_ICON_PNG IMGDIR"/ico_default.png"
index e0323c4d0422886b13191e9fc0a29a916ba49da1..f4f6d6b4ad88bfba35bbb2c0281d953248b466e4 100644 (file)
@@ -57,7 +57,7 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 100 100;
+                               min, SIZE_ICON_MAX SIZE_ICON_MAX;
                                rel1 {
                                        to, "part.thumb.icon.bg";
                                        relative, 0.5 0.5;
index fd4b4b444b6bc1755705c70bd14c96a6771d25b5..9bfff979617da16f974656c19eab10fcb0b04c27 100644 (file)
@@ -79,7 +79,7 @@ static Evas_Object *_content_get(void *data, Evas_Object *obj, const char *part)
        struct app_data *adata;
        Evas_Object *img, *ly, *icon_bg, *text_bg;
        char *icon, *img_path;
-       int idx;
+       int idx, w, h;
 
        if (!data || !obj) {
                _ERR("Invalid argument.");
@@ -106,7 +106,10 @@ static Evas_Object *_content_get(void *data, Evas_Object *obj, const char *part)
                if (!elm_image_file_set(img, img_path, NULL))
                        elm_image_file_set(img, DEFAULT_APP_ICON_PNG, NULL);
 
-               elm_image_resizable_set(img, EINA_FALSE, EINA_FALSE);
+               elm_image_object_size_get(img, &w, &h);
+
+               if (w <= SIZE_ICON_MAX && h <= SIZE_ICON_MAX)
+                       elm_image_resizable_set(img, EINA_FALSE, EINA_FALSE);
 
                return img;
        } else if (!strcmp(part, PART_THUMB_BG)) {