Icons are not visible. 22/64222/2
authorm.kawonczyk <m.kawonczyk@samsung.com>
Wed, 30 Mar 2016 13:16:28 +0000 (15:16 +0200)
committerm.kawonczyk <m.kawonczyk@samsung.com>
Thu, 31 Mar 2016 09:18:49 +0000 (11:18 +0200)
[Issue]    N/A
[Problem]  Icons on genlist are not visible
[Solution] Changed efl functions to support showing images
[Verify]   Download different content from browser, start
           download manager. Images for different mimes
           should be visible.

Change-Id: I754b5fe4aa4f6947082588547d07904cfcff564a
Signed-off-by: Maciej Kawonczyk <m.kawonczyk@samsung.com>
src/download-manager-viewItem.cpp
src/include/download-manager-viewItem.h

index 4017ab5..b8a5453 100755 (executable)
@@ -330,12 +330,13 @@ Evas_Object *ViewItem::getGenlistIcon(Evas_Object *obj, const char *part)
 
 #ifdef _TIZEN_2_3_UX
        DownloadView &view = DownloadView::getInstance();
-       if (strcmp(part,"elm.swallow.icon.1") == 0) {
-               Evas_Object *icon = elm_icon_add(obj);
-               elm_image_file_set(icon, getIconPath(), NULL);
-               evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        return icon;
+    if (strcmp(part,"elm.swallow.icon") == 0) {
+        Evas_Object *image = elm_image_add(obj);
+        elm_image_file_set(image, getIconPath(), NULL);
+        evas_object_size_hint_min_set(image, ELM_SCALE_SIZE(GENLIST_ICON_SIZE),
+                                      ELM_SCALE_SIZE(GENLIST_ICON_SIZE));
+        evas_object_show(image);
+        return image;
        } else if (getState() < ITEM::FINISH_DOWNLOAD) {
                if (strcmp(part, "elm.swallow.icon") == 0)
                        return createProgressBar(obj);
index 9579be6..01f2292 100755 (executable)
@@ -178,6 +178,8 @@ private:
        bool m_isGroupTitle;
        bool m_insertAtFirst;
        VIEWITEM_GROUP::GROUP m_group;
+
+    static const unsigned int GENLIST_ICON_SIZE = 46;
 };
 
 #endif /* DOWNLOAD_MANAGER_VIEW_ITEM_H */