add edc for view mode ctxpopup 95/46995/4
authorJehun Lim <jehun.lim@samsung.com>
Fri, 28 Aug 2015 05:25:31 +0000 (14:25 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Fri, 28 Aug 2015 10:10:59 +0000 (19:10 +0900)
Change-Id: If056e024f4fd85e2eb2372d7f4d1c85542e95a57
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
include/define.h
include/view/base.h
res/edc/images/btn_option_arrow_dis.png [new file with mode: 0644]
res/edc/images/btn_option_arrow_foc_up.png [new file with mode: 0644]
res/edc/images/btn_option_arrow_nor.png [new file with mode: 0644]
res/edc/images/btn_option_arrow_sel.png [new file with mode: 0644]
res/edc/mediahub-theme.edc
res/edc/widgets/button.edc
res/edc/widgets/ctxpopup.edc [new file with mode: 0644]

index dc8da71..50e92a1 100644 (file)
@@ -55,6 +55,7 @@
 #define COLOR_ITEM_BORDER 194 194 194 255
 #define COLOR_ITEM_DIVIDER 224 224 224 255
 #define COLOR_LIST_BG 244 244 244 255
+#define COLOR_POPUP_BORDER 154 154 154 255
 #define COLOR_NO_CONTENT_BG 229 229 229 255
 
 #define SHOW_VIEW_INTERVAL 0.1
@@ -78,6 +79,7 @@
 #define SIG_ITEM_SELECTED "item,selected"
 #define SIG_ITEM_UNSELECTED "item,unselected"
 #define SIG_ITEM_TOGGLED "item,toggled"
+#define SIG_ELM_HIDE "elm,state,hide"
 #define SIG_ELM_DISABLED "elm,state,disabled"
 #define SIG_ELM_FOCUS "elm,action,focus"
 #define SIG_ELM_UNFOCUS "elm,action,unfocus"
index 03fa4e7..c5f365d 100644 (file)
 #define IMAGE_THUMBNAIL_PLAY IMAGEDIR"/ic_thumbnail_play.png"
 #define IMAGE_THUMBNAIL_FAVORITE IMAGEDIR"/ic_thumbnail_favorite.png"
 #define IMAGE_PLAY_INFO_FAVORITE "ic_title_favorite.png"
+#define IMAGE_ARROW_UP_NOR "btn_option_arrow_nor.png"
+#define IMAGE_ARROW_UP_FOC "btn_option_arrow_foc_up.png"
+#define IMAGE_ARROW_UP_SEL "btn_option_arrow_sel.png"
+#define IMAGE_ARROW_UP_DIS "btn_option_arrow_dis.png"
 
 /* style */
 #define STYLE_BTN_MENU "base_btn_menu"
 #define STYLE_BTN_INDEX "base_btn_index"
+#define STYLE_BTN_VIEW_MODE "base_btn_view_mode"
+#define STYLE_BTN_VIEW_OPTION "base_btn_view_option"
 #define STYLE_BASE_PROGRESS "base_recent_progress"
 #define STYLE_TOAST_FAVORITE "base_toast_favorite"
+#define STYLE_CTXPOPUP_VIEW_MODE "base_ctxpopup_view_mode"
 
 #endif /* __AIR_MEDIAHUB_VIEW_BASE_H__ */
diff --git a/res/edc/images/btn_option_arrow_dis.png b/res/edc/images/btn_option_arrow_dis.png
new file mode 100644 (file)
index 0000000..dc33937
Binary files /dev/null and b/res/edc/images/btn_option_arrow_dis.png differ
diff --git a/res/edc/images/btn_option_arrow_foc_up.png b/res/edc/images/btn_option_arrow_foc_up.png
new file mode 100644 (file)
index 0000000..f101da0
Binary files /dev/null and b/res/edc/images/btn_option_arrow_foc_up.png differ
diff --git a/res/edc/images/btn_option_arrow_nor.png b/res/edc/images/btn_option_arrow_nor.png
new file mode 100644 (file)
index 0000000..17bc2c6
Binary files /dev/null and b/res/edc/images/btn_option_arrow_nor.png differ
diff --git a/res/edc/images/btn_option_arrow_sel.png b/res/edc/images/btn_option_arrow_sel.png
new file mode 100644 (file)
index 0000000..21b5ffa
Binary files /dev/null and b/res/edc/images/btn_option_arrow_sel.png differ
index e74c2b6..2c699e5 100644 (file)
@@ -18,6 +18,7 @@
 
 collections {
        #include "widgets/button.edc"
+       #include "widgets/ctxpopup.edc"
        #include "widgets/gengrid.edc"
        #include "widgets/genlist.edc"
        #include "widgets/notify.edc"
index 116dbfd..60f2caa 100644 (file)
@@ -3816,3 +3816,514 @@ group {
                }
        }
 }
+
+group {
+       name: "elm/button/base/base_btn_view_mode";
+       data.item: "focus_highlight" "on";
+       images {
+               image: IMAGE_ARROW_UP_NOR COMP;
+               image: IMAGE_ARROW_UP_FOC COMP;
+               image: IMAGE_ARROW_UP_SEL COMP;
+               image: IMAGE_ARROW_UP_DIS COMP;
+       }
+       script {
+               public cur_state;
+       }
+       parts {
+               part {
+                       name: "bg";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_ITEM_BG;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_ITEM_FOCUS;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "border_top";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel2.relative: 1.0 0.0;
+                               min: 0 2;
+                               align: 0.5 0.0;
+                               color: COLOR_TEXT_NORMAL;
+                               fixed: 0 1;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_SELECTED;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_DISABLED;
+                       }
+               }
+               part {
+                       name: "border_left";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "border_top";
+                                       relative: 0.0 1.0;
+                               }
+                               rel2 {
+                                       to: "bg";
+                                       relative: 0.0 1.0;
+                               }
+                               min: 2 0;
+                               align: 0.0 0.5;
+                               color: COLOR_TEXT_NORMAL;
+                               fixed: 1 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_SELECTED;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_DISABLED;
+                       }
+               }
+               part {
+                       name: "border_right";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "border_top";
+                                       relative: 1.0 1.0;
+                               }
+                               rel2 {
+                                       to: "bg";
+                                       relative: 1.0 1.0;
+                               }
+                               min: 2 0;
+                               align: 1.0 0.5;
+                               color: COLOR_TEXT_NORMAL;
+                               fixed: 1 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_SELECTED;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_DISABLED;
+                       }
+               }
+               part {
+                       name: "border_bottom";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "border_left";
+                                       relative: 1.0 1.0;
+                               }
+                               rel2 {
+                                       to: "border_right";
+                                       relative: 0.0 1.0;
+                               }
+                               min: 0 2;
+                               align: 0.5 1.0;
+                               color: COLOR_TEXT_NORMAL;
+                               fixed: 0 1;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_SELECTED;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_DISABLED;
+                       }
+               }
+               part {
+                       name: "padding_text";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel2.relative: 0.0 1.0;
+                               min: 30 0;
+                               align: 0.0 0.5;
+                               fixed: 1 0;
+                       }
+               }
+               part {
+                       name: "elm.text";
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "padding_text";
+                                       relative: 1.0 0.0;
+                               }
+                               rel2.to: "padding_text";
+                               text {
+                                       font: FONT_LIGHT;
+                                       size: 32;
+                                       align: 0.0 0.5;
+                               }
+                               min: 134 0;
+                               align: 0.0 0.5;
+                               color: COLOR_TEXT_NORMAL;
+                               fixed: 1 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_FOCUS;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_SELECTED;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_DISABLED;
+                       }
+               }
+               part {
+                       name: "padding_arrow";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "elm.text";
+                                       relative: 1.0 0.0;
+                               }
+                               rel2 {
+                                       to: "elm.text";
+                                       relative: 1.0 0.0;
+                               }
+                               min: 4 17;
+                               align: 0.0 0.0;
+                               fixed: 1 1;
+                       }
+               }
+               part {
+                       name: "part_arrow";
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "padding_arrow";
+                                       relative: 1.0 1.0;
+                               }
+                               rel2.to: "padding_arrow";
+                               image.normal: IMAGE_ARROW_UP_NOR;
+                               min: 20 30;
+                               align: 0.0 0.0;
+                               fixed: 1 1;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: IMAGE_ARROW_UP_FOC;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: IMAGE_ARROW_UP_SEL;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: IMAGE_ARROW_UP_DIS;
+                       }
+               }
+               part {
+                       name: "event";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 0 0 0 0;
+                       }
+               }
+       }
+       programs {
+               program {
+                       name: "load";
+                       signal: "load";
+                       source: "";
+                       script {
+                               set_int(cur_state, STATE_NORMAL);
+                       }
+               }
+               program {
+                       name: "button_clicked";
+                       signal: "mouse,clicked,1";
+                       source: "event";
+                       action: SIGNAL_EMIT "elm,action,click" "";
+               }
+               program {
+                       name: "focused";
+                       signal: SIG_ELM_FOCUS;
+                       source: SIG_SOURCE_ELM;
+                       script {
+                               set_int(cur_state, STATE_FOCUSED);
+                               run_program(PROGRAM:"focus,anim");
+                       }
+               }
+               program {
+                       name: "focus,anim";
+                       action: STATE_SET "focused" 0.0;
+                       target: "bg";
+                       target: "border_top";
+                       target: "border_left";
+                       target: "border_right";
+                       target: "border_bottom";
+                       target: "elm.text";
+                       target: "part_arrow";
+                       transition: TRANSITION_FOCUS;
+               }
+               program {
+                       name: "unfocused";
+                       signal: SIG_ELM_UNFOCUS;
+                       source: SIG_SOURCE_ELM;
+                       script {
+                               new state;
+                               state = get_int(cur_state);
+                               if (state == STATE_SELECTED) {
+                                       run_program(PROGRAM:"unfocus,sel,anim");
+                               } else {
+                                       run_program(PROGRAM:"unfocus,foc,anim");
+                               }
+                       }
+               }
+               program {
+                       name: "unfocus,sel,anim";
+                       action: STATE_SET "selected" 0.0;
+                       target: "bg";
+                       target: "border_top";
+                       target: "border_left";
+                       target: "border_right";
+                       target: "border_bottom";
+                       target: "elm.text";
+                       target: "part_arrow";
+                       transition: TRANSITION_FOCUS;
+               }
+               program {
+                       name: "unfocus,foc,anim";
+                       action: STATE_SET "default" 0.0;
+                       target: "bg";
+                       target: "border_top";
+                       target: "border_left";
+                       target: "border_right";
+                       target: "border_bottom";
+                       target: "elm.text";
+                       target: "part_arrow";
+                       transition: TRANSITION_FOCUS;
+               }
+               program {
+                       name: "selected";
+                       signal: SIG_BTN_SELECTED;
+                       source: SIG_SOURCE_SRC;
+                       script {
+                               set_int(cur_state, STATE_SELECTED);
+                       }
+               }
+               program {
+                       name: "disabled";
+                       signal: SIG_ELM_DISABLED;
+                       source: SIG_SOURCE_ELM;
+                       action: STATE_SET "disabled" 0.0;
+                       target: "bg";
+                       target: "border_top";
+                       target: "border_left";
+                       target: "border_right";
+                       target: "border_bottom";
+                       target: "elm.text";
+                       target: "part_arrow";
+               }
+       }
+}
+
+group {
+       name: "elm/button/base/base_btn_view_option";
+       inherit: "elm/button/base/base_btn_view_mode";
+       parts {
+               part {
+                       name: "bg";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 218 56;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_ITEM_FOCUS;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "border_top";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "border_left";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "border_right";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "border_bottom";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "elm.text";
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               text {
+                                       font: FONT_LIGHT;
+                                       size: 28;
+                                       align: 0.0 0.5;
+                               }
+                               min: 158 0;
+                               color: COLOR_TEXT_NORMAL;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_FOCUS;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_SELECTED;
+                       }
+               }
+               part {
+                       name: "part_arrow";
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+       }
+}
diff --git a/res/edc/widgets/ctxpopup.edc b/res/edc/widgets/ctxpopup.edc
new file mode 100644 (file)
index 0000000..1e3b2d7
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+
+group {
+       name: "elm/ctxpopup/base/base_ctxpopup_view_mode";
+       data.item: "focus_highlight" "on";
+       parts {
+               part {
+                       name: "bg";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 220 226;
+                               color: COLOR_ITEM_BG;
+                       }
+               }
+               part {
+                       name: "border_top";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel2.relative: 1.0 0.0;
+                               min: 0 1;
+                               align: 0.5 0.0;
+                               color: COLOR_POPUP_BORDER;
+                               fixed: 0 1;
+                       }
+               }
+               part {
+                       name: "border_left";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "border_top";
+                                       relative: 0.0 1.0;
+                               }
+                               rel2.relative: 0.0 1.0;
+                               min: 1 0;
+                               align: 0.0 0.5;
+                               color: COLOR_POPUP_BORDER;
+                               fixed: 1 0;
+                       }
+               }
+               part {
+                       name: "border_right";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "border_top";
+                                       relative: 1.0 1.0;
+                               }
+                               min: 1 0;
+                               align: 1.0 0.5;
+                               color: COLOR_POPUP_BORDER;
+                               fixed: 1 0;
+                       }
+               }
+               part {
+                       name: "border_bottom";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1.relative: 0.0 1.0;
+                               min: 0 1;
+                               align: 0.5 1.0;
+                               color: COLOR_POPUP_BORDER;
+                               fixed: 0 1;
+                       }
+               }
+               part {
+                       name: "elm.swallow.content";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "border_left";
+                                       relative: 1.0 0.0;
+                               }
+                               rel2 {
+                                       to: "border_bottom";
+                                       relative: 1.0 0.0;
+                               }
+                       }
+               }
+       }
+       programs {
+               program {
+                       name: "hide";
+                       signal: SIGNAL_ELM_HIDE;
+                       source: SIG_SOURCE_ELM;
+                       action: SIGNAL_EMIT "elm,action,hide,finished" "";
+               }
+       }
+}