diff options
-rw-r--r-- | include/define.h | 4 | ||||
-rw-r--r-- | include/layout/movie.h | 12 | ||||
-rw-r--r-- | include/view/base.h | 2 | ||||
-rw-r--r-- | include/view/viewer.h | 1 | ||||
-rw-r--r-- | res/edc/images/ic_preview_play.png | bin | 0 -> 11370 bytes | |||
-rw-r--r-- | res/edc/widgets/button.edc | 564 | ||||
-rw-r--r-- | res/edc/widgets/slider.edc | 47 |
7 files changed, 628 insertions, 2 deletions
diff --git a/include/define.h b/include/define.h index 905eaea..dd55262 100644 --- a/include/define.h +++ b/include/define.h @@ -53,7 +53,9 @@ #define PART_ELM_SWALLOW_VIDEO "elm.swallow.video" /* signal */ -#define SIG_ITEM_SELECTED "item_selected" +#define SIG_BTN_CLICKED "btn,clicked" +#define SIG_ITEM_SELECTED "item,selected" #define SIG_SOURCE_EDC "edc" +#define SIG_SOURCE_SRC "src" #endif /* __AIR_MEDIAHUB_DEFINE_H__ */ diff --git a/include/layout/movie.h b/include/layout/movie.h index 5d10efc..640ea4e 100644 --- a/include/layout/movie.h +++ b/include/layout/movie.h @@ -17,13 +17,25 @@ #ifndef __AIR_MEDIAHUB_LAYOUT_MOVIE_H__ #define __AIR_MEDIAHUB_LAYOUT_MOVIE_H__ +/* layout */ #define LAYOUT_MOVIE "LAYOUT_MOVIE" +/* group */ #define GRP_MOVIE_LAYOUT "group.movie_layout" +#define GRP_MOVIE_RECENT_CONTENT "group.movie_recent_content" +/* part */ #define PART_CONTENT "part.content" #define PART_NOCONTENT "part.nocontent" +#define PART_RECENT_CONTENT_THUMBNAIL "part.recent_content_thumbnail" +#define PART_RECENT_CONTENT_TITLE "part.recent_content_title" +#define PART_RECENT_CONTENT_DATE "part.recent_content_date" +#define PART_RECENT_CONTENT_PROGRESS "part.recent_content_progress" +#define PART_RECENT_CONTENT_TOTAL "part.recent_content_total" +#define PART_RECENT_CONTENT_SLIDER "part.recent_content_slider" +/* style */ #define STYLE_GRID_MOVIE_ITEM "movie_item" +#define STYLE_BTN_RECENT_CONTENT "base_btn_recent" #endif /* __AIR_MEDIAHUB_LAYOUT_MOVIE_H__ */ diff --git a/include/view/base.h b/include/view/base.h index a40dd4e..aa909e6 100644 --- a/include/view/base.h +++ b/include/view/base.h @@ -34,10 +34,12 @@ #define PART_ITEM_CONTENT "part.item_content" /* images */ +#define IMAGE_PREVIEW_PLAY "ic_preview_play.png" #define IMAGE_THUMBNAIL_PLAY IMAGEDIR"/ic_thumbnail_play.png" /* style */ #define STYLE_BTN_MENU "base_btn_menu" #define STYLE_BTN_INDEX "base_btn_index" +#define STYLE_BASE_PROGRESS "base_recent_progress" #endif /* __AIR_MEDIAHUB_VIEW_BASE_H__ */ diff --git a/include/view/viewer.h b/include/view/viewer.h index 580e287..d3d494e 100644 --- a/include/view/viewer.h +++ b/include/view/viewer.h @@ -40,7 +40,6 @@ /* signal */ #define SIG_SET_PLAY "set,play,icon" #define SIG_SET_PAUSE "set,pause,icon" -#define SIG_BTN_CLICKED "btn,clicked" #define SIG_BTN_CALLBACK "btn,callback" #define SIG_HIDE_BAR "hide,bar" #define SIG_SHOW_BAR "show,bar" diff --git a/res/edc/images/ic_preview_play.png b/res/edc/images/ic_preview_play.png Binary files differnew file mode 100644 index 0000000..2c20b3e --- /dev/null +++ b/res/edc/images/ic_preview_play.png diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc index 27bbf34..ae8ef37 100644 --- a/res/edc/widgets/button.edc +++ b/res/edc/widgets/button.edc @@ -591,3 +591,567 @@ group { } } } + +group { + name: "elm/button/base/base_btn_recent"; + data.item, "focus_highlight" "on"; + images { + image: IMAGE_PREVIEW_PLAY COMP; + } + parts { + part { + name: "bg"; + scale: 1; + description { + state: "default" 0.0; + min: 740 614; + } + } + part { + name: "map"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + perspective { + zplane: 0; + focal: 1000; + } + visible: 0; + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + perspective.zplane: -100; + } + } + part { + name: PART_RECENT_CONTENT_THUMBNAIL; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2 { + to: "bg_text"; + relative: 1.0 0.0; + } + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + part { + name: "default_image"; + type: IMAGE; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_RECENT_CONTENT_THUMBNAIL; + relative: 0.5 0.5; + } + rel2 { + to: PART_RECENT_CONTENT_THUMBNAIL; + relative: 0.5 0.5; + } + image.normal: IMAGE_PREVIEW_PLAY; + min: 120 120; + fixed: 1 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + 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 6; + 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_text"; + relative: 0.0 0.0; + } + min: 6 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_text"; + relative: 1.0 0.0; + } + min: 6 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: "defaultbg_text"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "bg"; + relative: 0.0 1.0; + } + rel2.to: "bg"; + min: 0 198; + align: 0.5 1.0; + color: COLOR_ITEM_BG; + fixed: 0 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS; + map.on: 1; + } + } + part { + name: "bg_text"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "defaultbg_text"; + rel2.to: "defaultbg_text"; + color: COLOR_ITEM_BG; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "padding_text_left"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "bg_text"; + rel2 { + to: "bg_text"; + relative: 0.0 0.0; + } + min: 26 28; + align: 0.0 0.0; + fixed: 1 1; + } + } + part { + name: "padding_text_right"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "bg_text"; + relative: 1.0 0.0; + } + rel2 { + to: "bg_text"; + relative: 1.0 0.0; + } + min: 26 28; + align: 1.0 0.0; + fixed: 1 1; + } + } + part { + name: PART_RECENT_CONTENT_TITLE; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "padding_text_left"; + relative: 1.0 1.0; + } + rel2 { + to: "padding_text_right"; + relative: 0.0 1.0; + } + text { + font: FONT_LIGHT; + size: 36; + align: 0.0 0.5; + } + min: 0 36; + align: 0.5 0.0; + color: COLOR_TEXT_FOCUS; + fixed: 0 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "selected" 0.0; + } + } + part { + name: "padding_text_date"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_RECENT_CONTENT_TITLE; + relative: 0.0 1.0; + } + rel2.to: PART_RECENT_CONTENT_TITLE; + min: 0 12; + align: 0.5 0.0; + fixed: 0 1; + } + } + part { + name: PART_RECENT_CONTENT_DATE; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "padding_text_date"; + relative: 0.0 1.0; + } + rel2.to: "padding_text_date"; + text { + font: FONT_LIGHT; + size: 28; + align: 0.0 0.5; + } + min: 0 28; + align: 0.5 0.0; + color: COLOR_TEXT_FOCUS; + fixed: 0 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "selected" 0.0; + } + } + part { + name: "padding_text_time"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_RECENT_CONTENT_DATE; + relative: 0.0 1.0; + } + rel2.to: PART_RECENT_CONTENT_DATE; + min: 0 34; + align: 0.5 0.0; + fixed: 0 1; + } + } + part { + name: PART_RECENT_CONTENT_PROGRESS; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "padding_text_time"; + relative: 0.0 1.0; + } + rel2 { + to: "padding_text_time"; + relative: 0.0 1.0; + } + text { + font: TEXT_LIGHT; + size: 20; + align: 0.0 0.5; + } + min: 100 20; + align: 0.0 0.0; + fixed: 1 1; + } + } + part { + name: PART_RECENT_CONTENT_TOTAL; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "padding_text_time"; + relative: 1.0 1.0; + } + rel2.to: "padding_text_time"; + text { + font: TEXT_LIGHT; + size: 20; + align: 1.0 0.5; + } + min: 100 20; + align: 1.0 0.0; + fixed: 1 1; + } + } + part { + name: "padding_slider"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_RECENT_CONTENT_PROGRESS; + relative: 0.0 1.0; + } + rel2.to: PART_RECENT_CONTENT_TOTAL; + min: 0 10; + align: 0.5 0.0; + fixed: 0 1; + } + } + part { + name: PART_RECENT_CONTENT_SLIDER; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "padding_slider"; + relative: 0.0 1.0; + } + rel2.to: "padding_slider"; + min: 0 30; + align: 0.5 0.0; + fixed: 0 1; + } + } + part { + name: "event"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + visible: 0; + } + } + } + programs { + program { + name: "go_active"; + signal: "elm,action,focus"; + source: "elm"; + action: STATE_SET "selected_0" 0.0; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "bg_text"; + target: PART_RECENT_CONTENT_TITLE; + target: PART_RECENT_CONTENT_DATE; + after: "focus,in,anim"; + } + program { + name: "focus,in,anim"; + action: STATE_SET "selected" 0.0; + target: PART_RECENT_CONTENT_THUMBNAIL; + target: "default_image"; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "bg_text"; + transition: LINEAR 0.17; + after: "focus,in,anim,2"; + } + program { + name: "focus,in,anim,2"; + action: STATE_SET "selected" 0.0; + target: "defaultbg_text"; + } + program { + name: "go_passive"; + signal: "elm,action,unfocus"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: PART_RECENT_CONTENT_TITLE; + target: PART_RECENT_CONTENT_DATE; + target: "defaultbg_text"; + after: "focus,out,anim"; + } + program { + name: "focus,out,anim"; + action: STATE_SET "selected_0" 0.0; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "bg_text"; + transition: LINEAR 0.17; + after: "focus,out,anim,2"; + } + program { + name: "focus,out,anim,2"; + action: STATE_SET "default" 0.0; + target: PART_RECENT_CONTENT_THUMBNAIL; + target: "default_image"; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "bg_text"; + } + program { + name: "button_clicked"; + signal: "mouse,clicked,1"; + source: "event"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { + name: SIG_BTN_CLICKED; + signal: SIG_BTN_CLICKED; + source: SIG_SOURCE_SRC; + action: STATE_SET "selected" 0.0; + target: "map"; + transition: DECELERATE 0.2; + after: "after_selected"; + } + program { + name: "after_selected"; + action: STATE_SET "default" 0.0; + target: "map"; + transition: DECELERATE 0.2; + after: "item_selected"; + } + program { + name: "item_selected"; + action: SIGNAL_EMIT SIG_ITEM_SELECTED SIG_SOURCE_EDC; + } + } +} diff --git a/res/edc/widgets/slider.edc b/res/edc/widgets/slider.edc index 2e0e34c..61a89a4 100644 --- a/res/edc/widgets/slider.edc +++ b/res/edc/widgets/slider.edc @@ -194,6 +194,53 @@ group { } group { + name: "elm/slider/horizontal/base_recent_progress"; + inherit: "elm/slider/horizontal/viewer_progress"; + parts { + part { + name: "base"; + scale: 1; + type: RECT; + description { + state: "default" 0.0; + rel1 { + to: "bg"; + relative: 0.0 0.0; + } + rel2 { + to: "bg"; + relative: 1.0 0.0; + } + min: 0 4; + fixed: 0 1; + align: 0.0 0.0; + color: 255 255 255 51; + } + } + part { + name: "glow"; + mouse_events: 0; + scale: 1; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "base"; + rel2 { + relative: 0.5 1.0; + to_x: "button"; + to_y: "base"; + } + min: 0 4; + max: 99999 4; + fixed: 0 1; + align: 0.0 1.0; + color: COLOR_TEXT_FOCUS; + } + } + } +} + +group { name: "elm/slider/horizontal/progress_indicator/default"; alias: "elm/slider/horizontal/popup/default"; parts { |