summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-08-28 03:30:22 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-08-28 03:30:22 -0700
commit9259672ce09fc3ab98a95aa96549decc7a61d6b0 (patch)
tree5d977ead76547c61d85350662c73ca1406dde5ae
parentcacc3e7c741282163fd68ebc727eec23c82b7dea (diff)
parent22e5f1ea46b1f835fe96f215e63e7d129bdbbef5 (diff)
downloadair_mediahub-accepted/tizen/tv/20150829.030858.tar.gz
air_mediahub-accepted/tizen/tv/20150829.030858.tar.bz2
air_mediahub-accepted/tizen/tv/20150829.030858.zip
Merge "add edc for view mode ctxpopup" into tizensubmit/tizen/20150828.103950accepted/tizen/tv/20150829.030858
-rw-r--r--include/define.h2
-rw-r--r--include/view/base.h7
-rw-r--r--res/edc/images/btn_option_arrow_dis.pngbin0 -> 2930 bytes
-rw-r--r--res/edc/images/btn_option_arrow_foc_up.pngbin0 -> 2911 bytes
-rw-r--r--res/edc/images/btn_option_arrow_nor.pngbin0 -> 2942 bytes
-rw-r--r--res/edc/images/btn_option_arrow_sel.pngbin0 -> 2967 bytes
-rw-r--r--res/edc/mediahub-theme.edc1
-rw-r--r--res/edc/widgets/button.edc511
-rw-r--r--res/edc/widgets/ctxpopup.edc115
9 files changed, 636 insertions, 0 deletions
diff --git a/include/define.h b/include/define.h
index dc8da71..50e92a1 100644
--- a/include/define.h
+++ b/include/define.h
@@ -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"
diff --git a/include/view/base.h b/include/view/base.h
index 03fa4e7..c5f365d 100644
--- a/include/view/base.h
+++ b/include/view/base.h
@@ -39,11 +39,18 @@
#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
index 0000000..dc33937
--- /dev/null
+++ b/res/edc/images/btn_option_arrow_dis.png
Binary files 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
index 0000000..f101da0
--- /dev/null
+++ b/res/edc/images/btn_option_arrow_foc_up.png
Binary files 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
index 0000000..17bc2c6
--- /dev/null
+++ b/res/edc/images/btn_option_arrow_nor.png
Binary files 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
index 0000000..21b5ffa
--- /dev/null
+++ b/res/edc/images/btn_option_arrow_sel.png
Binary files differ
diff --git a/res/edc/mediahub-theme.edc b/res/edc/mediahub-theme.edc
index e74c2b6..2c699e5 100644
--- a/res/edc/mediahub-theme.edc
+++ b/res/edc/mediahub-theme.edc
@@ -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"
diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc
index 116dbfd..60f2caa 100644
--- a/res/edc/widgets/button.edc
+++ b/res/edc/widgets/button.edc
@@ -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
index 0000000..1e3b2d7
--- /dev/null
+++ b/res/edc/widgets/ctxpopup.edc
@@ -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" "";
+ }
+ }
+}