From 34da9da8a42f5e7b2fa94300d9f4b49536494399 Mon Sep 17 00:00:00 2001 From: Hyojung Jo Date: Mon, 20 Jul 2015 15:16:49 +0900 Subject: [PATCH] Music grid: Fixed the content of thumbnail Change-Id: Ib635aae4b981de017d5e931c48c9646ec92e8a80 Signed-off-by: Hyojung Jo --- include/define.h | 3 +- res/widgets/gengrid_music.edc | 65 +++++++++++++++++++++++++++++++++++++------ src/grid/grid_music.c | 6 ++-- 3 files changed, 63 insertions(+), 11 deletions(-) diff --git a/include/define.h b/include/define.h index cb91d3d..448a61e 100644 --- a/include/define.h +++ b/include/define.h @@ -33,7 +33,8 @@ #define PART_THUMB_BG "part.thumb.bg" #define PART_THUMB_ICON "part.thumb.icon" #define PART_THUMB_TEXT "part.thumb.text" -#define PART_THUMB_SUBTEXT "part.thumb.subtext" +#define PART_THUMB_SUBTEXT1 "part.thumb.subtext1" +#define PART_THUMB_SUBTEXT2 "part.thumb.subtext2" #define PART_THUMB_ICON_BG "part.thumb.icon.bg" #define PART_THUMB_TEXT_BG "part.thumb.text.bg" #define PART_THUMB_PLAY_ICON "part.thumb.play.icon" diff --git a/res/widgets/gengrid_music.edc b/res/widgets/gengrid_music.edc index 3fe8fa0..6ce2334 100644 --- a/res/widgets/gengrid_music.edc +++ b/res/widgets/gengrid_music.edc @@ -17,7 +17,7 @@ group { name, "elm/gengrid/item/style.music/default"; data.item, "focus_highlight" "on"; - data.item, "texts" "part.thumb.text part.thumb.subtext"; + data.item, "texts" "part.thumb.text part.thumb.subtext1 part.thumb.subtext2"; data.item, "contents" "part.thumb.icon"; parts { part { @@ -108,7 +108,7 @@ group { } part { - name, "padding.thumb.subtext"; + name, "padding.thumb.subtext1"; type, SPACER; scale, 1; description { @@ -128,18 +128,18 @@ group { } part { - name, PART_THUMB_SUBTEXT; + name, PART_THUMB_SUBTEXT1; type, TEXT; scale, 1; description { state, "default" 0.0; color, 153 153 153 255; - min, 302 52; + min, 302 24; rel1 { - to, "padding.thumb.subtext"; + to, "padding.thumb.subtext1"; relative, 1.0 1.0; } - rel2.to, "padding.thumb.subtext"; + rel2.to, "padding.thumb.subtext1"; align, 0.0 0.0; fixed, 1 1; text { @@ -155,6 +155,53 @@ group { } } + part { + "padding.thumb.subtext2"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 4; + rel1 { + to, PART_THUMB_SUBTEXT1; + relative, 0.0 1.0; + } + rel2 { + to, PART_THUMB_SUBTEXT1; + relative, 0.0 1.0; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, PART_THUMB_SUBTEXT2; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + color, 153 153 153 255; + min, 302 24; + rel1 { + to, "padding.thumb.subtext2"; + relative, 1.0 1.0; + } + rel2.to, "padding.thumb.subtext2"; + align, 0.0 0.0; + fixed, 1 1; + text { + font, FONT_TIZENSANS_LIGHT; + size, 24; + align, 0.0 0.5; + } + } + description { + state, "focused" 0.0; + inherit, "default" 0.0; + color, 255 255 255 255; + } + } part { name, "part.focus.up"; @@ -349,7 +396,8 @@ group { action, STATE_SET "focused" 0.0; target, PART_THUMB_TEXT_BG; target, PART_THUMB_TEXT; - target, PART_THUMB_SUBTEXT; + target, PART_THUMB_SUBTEXT1; + target, PART_THUMB_SUBTEXT2; target, "part.focus.up"; target, "part.focus.left"; target, "part.focus.down"; @@ -367,7 +415,8 @@ group { action, STATE_SET "default" 0.0; target, PART_THUMB_TEXT_BG; target, PART_THUMB_TEXT; - target, PART_THUMB_SUBTEXT; + target, PART_THUMB_SUBTEXT1; + target, PART_THUMB_SUBTEXT2; target, "part.focus.up"; target, "part.focus.left"; target, "part.focus.down"; diff --git a/src/grid/grid_music.c b/src/grid/grid_music.c index f2524e5..0d776da 100644 --- a/src/grid/grid_music.c +++ b/src/grid/grid_music.c @@ -40,9 +40,11 @@ static char *_text_get(void *data, Evas_Object *obj, const char *part) am = data; if (!strcmp(part, PART_THUMB_TEXT)) - return strdup(get_media_artist(am)); - else if (!strcmp(part, PART_THUMB_SUBTEXT)) return strdup(get_media_name(am)); + else if (!strcmp(part, PART_THUMB_SUBTEXT1)) + return strdup(get_media_artist(am)); + else if (!strcmp(part, PART_THUMB_SUBTEXT2)) + return strdup(get_media_album_name(am)); return NULL; } -- 2.7.4