summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-12-10 19:16:24 +0900
committerJehun Lim <jehun.lim@samsung.com>2015-12-10 19:17:30 +0900
commitc661dcbac8ed9ef252a29d706daf260bd6a2162c (patch)
tree388280964528bc1a5b65b5035914bd8006a9d9f0 /src
parentfb1b7fe7db7457539d0949ee0eae5cdc646aaaed (diff)
downloadair_mediahub-c661dcbac8ed9ef252a29d706daf260bd6a2162c.tar.gz
air_mediahub-c661dcbac8ed9ef252a29d706daf260bd6a2162c.tar.bz2
air_mediahub-c661dcbac8ed9ef252a29d706daf260bd6a2162c.zip
movie: set default thumbnail bg color for recently watched itemsubmit/tizen/20151210.111053accepted/tizen/tv/20151210.231052
Change-Id: I3e6ba7f5e81b454f7e5f2c8b470772bcf83e5843 Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/layout/movie.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/layout/movie.c b/src/layout/movie.c
index 59a6249..efefa0c 100644
--- a/src/layout/movie.c
+++ b/src/layout/movie.c
@@ -71,27 +71,35 @@ struct _priv {
static bool _update_recent_info(Evas_Object *base, app_media_info *info)
{
- Evas_Object *image, *text_bg;
+ Evas_Object *img, *img_bg, *text_bg;
struct color_data bg;
struct tm tm;
char buf[32];
- image = elm_object_part_content_get(base,
+ img = elm_object_part_content_get(base,
PART_RECENT_CONTENT_THUMBNAIL);
- if (!image) {
- _ERR("failed to get image object");
+ img_bg = elm_object_part_content_get(base,
+ PART_RECENT_CONTENT_IMGBG);
+
+ if (!img || !img_bg) {
+ _ERR("failed to get object");
return false;
}
+ if (info->thumbnail_path) {
+ elm_image_file_set(img, info->thumbnail_path, NULL);
+ elm_image_aspect_fixed_set(img, EINA_FALSE);
+
+ evas_object_color_set(img_bg, 0, 0, 0, 0);
+ } else
+ evas_object_color_set(img_bg, 0, 0, 0, 255);
+
text_bg = elm_object_part_content_get(base, PART_RECENT_CONTENT_TEXTBG);
if (!text_bg) {
_ERR("failed to get textbg part");
return false;
}
- elm_image_file_set(image, info->thumbnail_path, NULL);
- elm_image_aspect_fixed_set(image, EINA_FALSE);
-
app_contents_get_color(info->title, NULL, &bg);
evas_object_color_set(text_bg, bg.r, bg.g, bg.b, bg.a);
@@ -170,7 +178,7 @@ static bool _draw_recent_title(Evas_Object *base)
static bool _draw_recent_content(struct _priv *priv, Evas_Object *base)
{
- Evas_Object *btn, *image, *text_bg;
+ Evas_Object *btn, *image, *img_bg, *text_bg;
struct progressbar *prog;
btn = elm_button_add(base);
@@ -187,6 +195,12 @@ static bool _draw_recent_content(struct _priv *priv, Evas_Object *base)
return false;
}
+ img_bg = evas_object_rectangle_add(btn);
+ if (!img_bg) {
+ _ERR("failed to create rectangle object");
+ return false;
+ }
+
text_bg = evas_object_rectangle_add(btn);
if (!text_bg) {
_ERR("failed to create rectangle object");
@@ -194,6 +208,7 @@ static bool _draw_recent_content(struct _priv *priv, Evas_Object *base)
}
elm_object_part_content_set(btn, PART_RECENT_CONTENT_THUMBNAIL, image);
+ elm_object_part_content_set(btn, PART_RECENT_CONTENT_IMGBG, img_bg);
elm_object_part_content_set(btn, PART_RECENT_CONTENT_TEXTBG, text_bg);
elm_object_part_content_set(base, PART_ITEM_CONTENT, btn);