summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-07-20 15:46:04 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2015-07-20 20:25:08 +0900
commitce687a6a902e70ccb17b046c919d2907f567410f (patch)
tree9181cd9cbd02154fd9659d0c4dda52fa0bf14296 /res
parent09e475fa429adfec5db319b011d1e307d9a9b174 (diff)
downloadair_mediahub-ce687a6a902e70ccb17b046c919d2907f567410f.tar.gz
air_mediahub-ce687a6a902e70ccb17b046c919d2907f567410f.tar.bz2
air_mediahub-ce687a6a902e70ccb17b046c919d2907f567410f.zip
musicplayer: add genlist for showing playlist
Change-Id: Id03857f678cdb6abeab2233d8088a3fa9dbfde58 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'res')
-rw-r--r--res/edc/images/ic_music_list_play.pngbin0 -> 1027 bytes
-rw-r--r--res/edc/images/ic_music_list_play_foc.pngbin0 -> 1709 bytes
-rw-r--r--res/edc/mediahub-theme.edc1
-rw-r--r--res/edc/view/mplayer.edc13
-rw-r--r--res/edc/widgets/genlist.edc376
5 files changed, 389 insertions, 1 deletions
diff --git a/res/edc/images/ic_music_list_play.png b/res/edc/images/ic_music_list_play.png
new file mode 100644
index 0000000..7a6ae5d
--- /dev/null
+++ b/res/edc/images/ic_music_list_play.png
Binary files differ
diff --git a/res/edc/images/ic_music_list_play_foc.png b/res/edc/images/ic_music_list_play_foc.png
new file mode 100644
index 0000000..9392c0f
--- /dev/null
+++ b/res/edc/images/ic_music_list_play_foc.png
Binary files differ
diff --git a/res/edc/mediahub-theme.edc b/res/edc/mediahub-theme.edc
index 4eb7b88..f1981b6 100644
--- a/res/edc/mediahub-theme.edc
+++ b/res/edc/mediahub-theme.edc
@@ -19,5 +19,6 @@
collections {
#include "widgets/button.edc"
#include "widgets/gengrid.edc"
+ #include "widgets/genlist.edc"
#include "widgets/slider.edc"
}
diff --git a/res/edc/view/mplayer.edc b/res/edc/view/mplayer.edc
index 1a4415f..21c9654 100644
--- a/res/edc/view/mplayer.edc
+++ b/res/edc/view/mplayer.edc
@@ -429,10 +429,21 @@ group {
clip_to: "rightarea";
description {
state: "default" 0.0;
- color: COLOR_BASE_BG;
+ color: COLOR_LIST_BG;
rel1.to: "rightarea";
rel2.to: "rightarea";
}
}
+ part {
+ name: PART_MPLAYER_LIST;
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "rightarea";
+ description {
+ state: "default" 0.0;
+ rel1.to: "rightarea_bg";
+ rel2.to: "rightarea_bg";
+ }
+ }
}
}
diff --git a/res/edc/widgets/genlist.edc b/res/edc/widgets/genlist.edc
new file mode 100644
index 0000000..c93f86d
--- /dev/null
+++ b/res/edc/widgets/genlist.edc
@@ -0,0 +1,376 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LIST_TRANSITION_TIME 0.30
+
+group {
+ name: "elm/genlist/item/music_list/default";
+ data.item: "selectraise" "on";
+ data.item: "focusraise" "on";
+ data.item: "texts" "elm.text.title elm.text.artist elm.text.playtime";
+ data.item: "contents" "elm.swallow.icon";
+ data.item: "focus_highlight" "on";
+ images {
+ image: IMAGE_MUSIC_LIST_PLAY COMP;
+ image: IMAGE_MUSIC_LIST_PLAY_FOC COMP;
+ }
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 140;
+ color: COLOR_LIST_BG;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ color: COLOR_ITEM_FOCUS;
+ }
+ }
+ part {
+ name: "left_padding";
+ type: SPACER;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 44 140;
+ rel1 {
+ to: "bg";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to: "bg";
+ relative: 0.0 0.0;
+ }
+ fixed: 1 1;
+ align: 0.0 0.0;
+ }
+ }
+ part {
+ name: "image_bg";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 140;
+ rel1 {
+ to: "left_padding";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: "left_padding";
+ relative: 1.0 0.0;
+ }
+ fixed: 1 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ description {
+ state: "default" 0.1;
+ inherit: "default" 0.0;
+ min: 40 140;
+ }
+ }
+ part {
+ name: "image_play";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 40 40;
+ rel1 {
+ to: "image_bg";
+ relative: 0.5 0.5;
+ }
+ rel2 {
+ to: "image_bg";
+ relative: 0.5 0.5;
+ }
+ align: 0.5 0.5;
+ fixed: 1 1;
+ visible: 0;
+ }
+ description {
+ state: "default" 0.1;
+ inherit: "default" 0.0;
+ min: 40 40;
+ fixed: 1 1;
+ image.normal: IMAGE_MUSIC_LIST_PLAY;
+ visible: 1;
+ }
+ description {
+ state: "focused" 0.1;
+ inherit: "default" 0.0;
+ min: 40 40;
+ fixed: 1 1;
+ image.normal: IMAGE_MUSIC_LIST_PLAY_FOC;
+ visible: 1;
+ }
+ }
+ part {
+ name: "image_padding";
+ type: SPACER;
+ description {
+ state: "default" 0.0;
+ min: 0 140;
+ rel1 {
+ to: "image_bg";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: "image_bg";
+ relative: 1.0 0.0;
+ }
+ fixed: 1 1;
+ align: 0.0 0.0;
+ }
+ description {
+ state: "default" 0.1;
+ inherit: "default" 0.0;
+ min: 28 140;
+ }
+ }
+ part {
+ name: "right_padding";
+ type: SPACER;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 40 140;
+ rel1 {
+ to: "bg";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: "bg";
+ relative: 1.0 0.0;
+ }
+ fixed: 1 1;
+ align: 1.0 0.0;
+ }
+ }
+ part {
+ name: "time_padding";
+ type: SPACER;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 140;
+ rel1 {
+ to: "right_padding";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to: "right_padding";
+ relative: 0.0 0.0;
+ }
+ fixed: 1 1;
+ align: 0.0 0.0;
+ }
+ description {
+ state: "default" 0.1;
+ inherit: "default" 0.0;
+ min: 130 140;
+ rel1 {
+ to: "right_padding";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: "right_padding";
+ relative: 1.0 0.0;
+ }
+ align: 0.0 0.0;
+ fixed: 1 1;
+ }
+ }
+ part {
+ name: PART_ELM_TEXT_PLAYTIME;
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 130 0;
+ rel1 {
+ to: "time_padding";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: "time_padding";
+ relative: 1.0 1.0;
+ }
+ text {
+ font: FONT_LIGHT;
+ size: 28;
+ align: 1.0 0.5;
+ }
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: COLOR_TEXT_MENU;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ color: COLOR_TEXT_FOCUS;
+ }
+ }
+ part {
+ name: PART_ELM_TEXT_TITLE;
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 68;
+ rel1 {
+ to: "image_padding";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: PART_ELM_TEXT_PLAYTIME;
+ relative: 0.0 0.0;
+ }
+ text {
+ font: FONT_LIGHT;
+ size: 36;
+ align: 0.0 1.0;
+ }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: COLOR_TEXT_INDEX;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ color: COLOR_TEXT_FOCUS;
+ }
+ }
+ part {
+ name: PART_ELM_TEXT_ARTIST;
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 44;
+ rel1 {
+ to: PART_ELM_TEXT_TITLE;
+ relative: 0.0 1.0;
+ }
+ rel2 {
+ to: PART_ELM_TEXT_TITLE;
+ relative: 1.0 1.0;
+ }
+ text {
+ font: FONT_LIGHT;
+ size: 28;
+ align: 0.0 1.0;
+ }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: COLOR_TEXT_MENU;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ color: COLOR_TEXT_FOCUS;
+ }
+ }
+ }
+ script {
+ public focus_status = 0;
+ public select_status = 0;
+ }
+ programs {
+ program {
+ name: "go_active";
+ signal: "elm,state,focused";
+ source: "elm";
+ script {
+ set_int(focus_status, 1);
+ set_state(PART:"bg", "focused", 0.0);
+ set_state(PART:PART_ELM_TEXT_TITLE, "focused", 0.0);
+ set_state(PART:PART_ELM_TEXT_ARTIST, "focused", 0.0);
+ set_state(PART:PART_ELM_TEXT_PLAYTIME, "focused", 0.0);
+ if (get_int(select_status) == 1)
+ set_state(PART:"image_play", "focused", 0.1);
+ else
+ set_state(PART:"image_play", "default", 0.0);
+ }
+ }
+ program {
+ name: "go_passive";
+ signal: "elm,state,unfocused";
+ source: "elm";
+ script {
+ set_int(focus_status, 0);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:PART_ELM_TEXT_TITLE, "default", 0.0);
+ set_state(PART:PART_ELM_TEXT_ARTIST, "default", 0.0);
+ set_state(PART:PART_ELM_TEXT_PLAYTIME, "default", 0.0);
+ if (get_int(select_status) == 1)
+ set_state(PART:"image_play", "default", 0.1);
+ else
+ set_state(PART:"image_play", "default", 0.0);
+ }
+ }
+ program {
+ name: "go_select";
+ signal: SIG_ITEM_SELECTED;
+ source: SIG_SOURCE_SRC;
+ script {
+ set_int(select_status, 1);
+ run_program(PROGRAM:"anim,select");
+ }
+ }
+ program {
+ name: "anim,select";
+ action: STATE_SET "default" 0.1;
+ target: "image_padding";
+ target: "image_bg";
+ target: "time_padding";
+ transition: LINEAR LIST_TRANSITION_TIME;
+ after: "select,image";
+ }
+ program {
+ name: "select,image";
+ script {
+ if (get_int(focus_status) == 1)
+ set_state(PART:"image_play", "focused", 0.1);
+ else
+ set_state(PART:"image_play", "default", 0.1);
+ }
+ }
+ program {
+ name: "go_unselect";
+ signal: SIG_ITEM_UNSELECTED;
+ source: SIG_SOURCE_SRC;
+ script {
+ set_int(select_status, 0);
+ set_state(PART:"image_play", "default", 0.0);
+ run_program(PROGRAM:"anim,unselect");
+ }
+ }
+ program {
+ name: "anim,unselect";
+ action: STATE_SET "default" 0.0;
+ target: "image_padding";
+ target: "image_bg";
+ target: "time_padding";
+ transition: LINEAR LIST_TRANSITION_TIME;
+ }
+ }
+}