#define PART_ELM_TEXT_PLAYTIME "elm.text.playtime"
#define PART_ELM_TEXT_COUNT "elm.text.count"
#define PART_ELM_SWALLOW_THUMBNAIL "elm.swallow.thumbnail"
+#define PART_ELM_SWALLOW_PICTURE "elm.swallow.picture"
#define PART_ELM_SWALLOW_VIDEO "elm.swallow.video"
#define PART_ELM_SWALLOW_FAVORITE "elm.swallow.favorite"
#define PART_ELM_SWALLOW_BG "elm.swallow.bg"
/* images */
#define IMAGE_PREVIEW_PLAY "ic_preview_play.png"
-#define IMAGE_THUMBNAIL_PICTURE "ic_thumbnail_picture.png"
+#define IMAGE_THUMBNAIL_PICTURE IMAGEDIR"/ic_thumbnail_picture.png"
#define IMAGE_THUMBNAIL_SONG "ic_thumbnail_song.png"
#define IMAGE_THUMBNAIL_PLAY IMAGEDIR"/ic_thumbnail_play.png"
#define IMAGE_THUMBNAIL_FAVORITE IMAGEDIR"/ic_thumbnail_favorite.png"
name: "elm/gengrid/item/gallery_item/default";
data.item: "selectraise" "on";
data.item: "texts" "elm.text.playtime";
- data.item: "contents" "elm.swallow.thumbnail elm.swallow.video elm.swallow.favorite";
+ data.item: "contents" "elm.swallow.thumbnail elm.swallow.picture elm.swallow.video elm.swallow.favorite";
data.item: "focus_highlight" "on";
- images {
- image: IMAGE_THUMBNAIL_PICTURE COMP;
- }
parts {
part {
name: "elm.padding.bottom_right";
}
}
part {
- name: "default_image";
+ name: PART_ELM_SWALLOW_PICTURE;
scale: 1;
- type: IMAGE;
+ type: SWALLOW;
description {
state: "default" 0.0;
rel1 {
to: "defaultbg";
relative: 0.5 0.5;
}
- image.normal: IMAGE_THUMBNAIL_PICTURE;
min: 80 80;
fixed: 1 1;
}
name: "focus,in,anim";
action: STATE_SET "selected" 0.0;
target: "defaultbg";
- target: "default_image";
target: PART_ELM_SWALLOW_THUMBNAIL;
+ target: PART_ELM_SWALLOW_PICTURE;
target: PART_ELM_SWALLOW_VIDEO;
target: PART_ELM_SWALLOW_FAVORITE;
target: "part_focus1";
name: "focus,out,anim";
action: STATE_SET "default" 0.0;
target: PART_ELM_SWALLOW_THUMBNAIL;
+ target: PART_ELM_SWALLOW_PICTURE;
target: PART_ELM_SWALLOW_VIDEO;
target: PART_ELM_SWALLOW_FAVORITE;
target: "defaultbg";
- target: "default_image";
target: "part_focus1";
target: "part_focus2";
target: "part_focus3";
_ERR("failed to create image object");
return NULL;
}
+ } else if (!strcmp(part, PART_ELM_SWALLOW_PICTURE)) {
+ if (info->media_type != MEDIA_CONTENT_TYPE_IMAGE)
+ return NULL;
+
+ if (info->thumbnail_path)
+ return NULL;
+
+ eo = util_add_image(obj, IMAGE_THUMBNAIL_PICTURE);
+ if (!eo) {
+ _ERR("failed to create image object");
+ return NULL;
+ }
} else if (!strcmp(part, PART_ELM_SWALLOW_VIDEO)) {
if (info->media_type != MEDIA_CONTENT_TYPE_VIDEO)
return NULL;
content = util_add_image(obj, info->thumbnail_path);
if (!content)
goto err;
+ } else if (!strcmp(part, PART_ELM_SWALLOW_PICTURE)) {
+ if (info->media_type != MEDIA_CONTENT_TYPE_IMAGE)
+ return NULL;
- evas_object_show(content);
+ if (info->thumbnail_path)
+ return NULL;
+
+ content = util_add_image(obj, IMAGE_THUMBNAIL_PICTURE);
+ if (!content)
+ goto err;
} else if (!strcmp(part, PART_ELM_SWALLOW_VIDEO)) {
if (info->media_type != MEDIA_CONTENT_TYPE_VIDEO)
return NULL;
content = util_add_image(obj, IMAGE_THUMBNAIL_PLAY);
if (!content)
goto err;
-
- evas_object_show(content);
} else if (!strcmp(part, PART_ELM_SWALLOW_TEXTBG)) {
content = evas_object_rectangle_add(obj);
if (!content)
app_contents_get_color(info->title, NULL, &bg);
evas_object_color_set(content, bg.r, bg.g, bg.b, bg.a);
+ }
+ if (content)
evas_object_show(content);
- }
return content;
app_contents_get_color(mi->title, NULL, &bg);
evas_object_color_set(eo, bg.r, bg.g, bg.b, bg.a);
+ } else if (!strcmp(part, PART_ELM_SWALLOW_PICTURE)) {
+ if (mi->media_type != MEDIA_CONTENT_TYPE_IMAGE)
+ return NULL;
+
+ if (mi->thumbnail_path)
+ return NULL;
+
+ eo = util_add_image(obj, IMAGE_THUMBNAIL_PICTURE);
+ if (!eo) {
+ _ERR("failed to create image object");
+ return NULL;
+ }
} else if (!strcmp(part, PART_ELM_SWALLOW_VIDEO)) {
if (mi->media_type != MEDIA_CONTENT_TYPE_VIDEO)
return NULL;