From: Jehun Lim Date: Thu, 2 Jul 2015 07:03:06 +0000 (+0900) Subject: add gengrid item style for photo and video contents X-Git-Tag: accepted/tizen/tv/20150728.070555~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41b883b66905bde66e0178b5729bade9d4bc23c7;p=profile%2Ftv%2Fapps%2Fnative%2Fair_mediahub.git add gengrid item style for photo and video contents Change-Id: Ic8c66668c3fe4f972d83b9d0a37b2fa7fd2bbb68 Signed-off-by: Jehun Lim --- diff --git a/include/define.h b/include/define.h index 20da0e8..6ecf61b 100644 --- a/include/define.h +++ b/include/define.h @@ -47,4 +47,10 @@ #define COLOR_ITEM_FOCUS 0 119 246 255 #define COLOR_ITEM_FOCUS_0 0 119 246 0 +/* part */ +#define PART_ELM_TEXT_TITLE "elm.text.title" +#define PART_ELM_TEXT_PLAYTIME "elm.text.playtime" +#define PART_ELM_SWALLOW_THUMBNAIL "elm.swallow.thumbnail" +#define PART_ELM_SWALLOW_VIDEO "elm.swallow.video" + #endif /* __AIR_MEDIAHUB_DEFINE_H__ */ diff --git a/include/layout/gallery.h b/include/layout/gallery.h index aa7e914..3ea6526 100644 --- a/include/layout/gallery.h +++ b/include/layout/gallery.h @@ -21,4 +21,6 @@ #define GRP_GALLERY_LAYOUT "group.gallery_layout" +#define STYLE_GRID_GALLERY_ITEM "gallery_item" + #endif /* __AIR_MEDIAHUB_LAYOUT_GALLERY_H__ */ diff --git a/res/edc/widgets/gengrid.edc b/res/edc/widgets/gengrid.edc index 3e9a631..789f9da 100644 --- a/res/edc/widgets/gengrid.edc +++ b/res/edc/widgets/gengrid.edc @@ -17,8 +17,8 @@ group { name: "elm/gengrid/item/movie_item/default"; data.item: "selectraise" "on"; - data.item: "texts" "elm.text"; - data.item: "contents" "elm.swallow.icon"; + data.item: "texts" "elm.text.title"; + data.item: "contents" "elm.swallow.thumbnail"; data.item: "focus_highlight" "on"; parts { part { @@ -89,7 +89,7 @@ group { } } part { - name: "elm.swallow.icon"; + name: PART_SWALLOW_THUMBNAIL; type: SWALLOW; scale: 1; mouse_events: 1; @@ -300,7 +300,7 @@ group { } } part { - name: "elm.text"; + name: PART_ELM_TEXT_TITLE; type: TEXT; scale: 1; description { @@ -346,14 +346,14 @@ group { target: "part_focus2"; target: "part_focus3"; target: "elm.bg.text"; - target: "elm.text"; + target: PART_ELM_TEXT_TITLE; after: "focus,in,anim"; } program { name: "focus,in,anim"; action: STATE_SET "selected" 0.0; target: "defaultbg"; - target: "elm.swallow.icon"; + target: PART_SWALLOW_THUMBNAIL; target: "part_focus1"; target: "part_focus2"; target: "part_focus3"; @@ -365,7 +365,7 @@ group { signal: "elm,state,unfocused"; source: "elm"; action: STATE_SET "default" 0.0; - target: "elm.text"; + target: PART_ELM_TEXT_TITLE; after: "focus,out,anim"; } program { @@ -381,7 +381,7 @@ group { program { name: "focus,out,anim,3"; action: STATE_SET "default" 0.0; - target: "elm.swallow.icon"; + target: PART_SWALLOW_THUMBNAIL; target: "defaultbg"; target: "part_focus1"; target: "part_focus2"; @@ -390,3 +390,339 @@ group { } } } + +group { + 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"; + data.item: "focus_highlight" "on"; + parts { + part { + name: "elm.padding.bottom_right"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1.relative: 1.0 1.0; + min: 6 6; + align: 1.0 1.0; + fixed: 1 1; + } + } + part { + name: "map"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + perspective { + zplane: 0; + focal: 1000; + } + visible: 0; + } + description { + state: "clicked" 0.0; + inherit: "default" 0.0; + perspective.zplane: -100; + } + } + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel2 { + to: "elm.padding.bottom_right"; + relative: 0.0 0.0; + } + fixed: 1 1; + visible: 0; + } + } + part { + name: "defaultbg"; + scale: 1; + type: RECT; + mouse_events: 1; + description { + state : "default" 0.0; + rel1.to: "bg"; + rel2.to: "bg"; + color: 0 0 0 115; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + part { + name: PART_ELM_SWALLOW_THUMBNAIL; + scale: 1; + type: SWALLOW; + mouse_events: 1; + description { + state : "default" 0.0; + rel1.to: "defaultbg"; + rel2.to: "defaultbg"; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + part { + name: PART_ELM_SWALLOW_VIDEO; + scale: 1; + type: SWALLOW; + description { + state: "default" 0.0; + rel1.to: "defaultbg"; + rel2.to: "defaultbg"; + } + } + part { + name: "part_focus1"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2 { + to: "bg"; + relative: 1.0 0.0; + } + min: 0 3; + align: 0.5 0.0; + color: COLOR_ITEM_FOCUS; + fixed: 0 1; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "part_focus2"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "part_focus1"; + relative: 0.0 1.0; + } + rel2 { + to: "bg"; + relative: 0.0 1.0; + } + min: 3 0; + align: 0.0 0.5; + color: COLOR_ITEM_FOCUS; + fixed: 1 0; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "part_focus3"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "part_focus1"; + relative: 1.0 1.0; + } + rel2.to: "bg"; + min: 3 0; + align: 1.0 0.5; + color: COLOR_ITEM_FOCUS; + fixed: 1 0; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "part_focus4"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "part_focus2"; + relative: 1.0 1.0; + } + rel2 { + to: "part_focus3"; + relative: 0.0 1.0; + } + min: 0 3; + align: 0.5 1.0; + color: COLOR_ITEM_FOCUS; + fixed: 0 1; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "padding_playtime"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "defaultbg"; + relative: 1.0 1.0; + } + rel2.to: "defaultbg"; + min: 12 12; + align: 1.0 1.0; + fixed: 1 1; + } + } + part { + name: PART_ELM_TEXT_PLAYTIME; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "padding_playtime"; + rel2 { + to: "padding_playtime"; + relative: 0.0 0.0; + } + text { + font: FONT_LIGHT; + size: 24; + min: 1 0; + align: 1.0 1.0; + } + min: 0 24; + align: 1.0 1.0; + color: COLOR_TEXT_FOCUS; + fixed: 0 1; + } + } + } + programs { + program { + name: "go_active"; + signal: "elm,state,focused"; + source: "elm"; + action: STATE_SET "selected_0" 0.0; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "part_focus4"; + after: "focus,in,anim"; + } + program { + name: "focus,in,anim"; + action: STATE_SET "selected" 0.0; + target: "defaultbg"; + target: PART_ELM_SWALLOW_THUMBNAIL; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "part_focus4"; + transition: LINEAR 0.17; + } + program { + name: "go_passive"; + signal: "elm,state,unfocused"; + source: "elm"; + action: STATE_SET "selected_0" 0.0; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "part_focus4"; + transition: LINEAR 0.17; + after: "focus,out,anim"; + } + program { + name: "focus,out,anim"; + action: STATE_SET "default" 0.0; + target: PART_ELM_SWALLOW_THUMBNAIL; + target: "defaultbg"; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "part_focus4"; + } + } +}