add button and gengrid edc 53/42553/4
authorJehun Lim <jehun.lim@samsung.com>
Tue, 30 Jun 2015 04:38:59 +0000 (13:38 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Tue, 30 Jun 2015 05:21:06 +0000 (14:21 +0900)
: button for index in thumbnail area and gengrid for movie item

Change-Id: Ic3a5c112a5d9e79ea33ae9c5e48d25e57ad62080
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
include/define.h
include/view/base.h
res/edc/mediahub-theme.edc
res/edc/widgets/button.edc
res/edc/widgets/gengrid.edc [new file with mode: 0644]

index c0e23171ee9c78d46ddd8f80e786556a1457a808..56003cb226be0883680b638fb9bf53d8cbe53cbb 100644 (file)
@@ -42,5 +42,8 @@
 #define COLOR_TEXT_DISABLED 87 87 87 128
 #define COLOR_BTN_FOCUS 0 119 246 255
 #define COLOR_BTN_SELECTED 64 136 211 255
+#define COLOR_ITEM_BG 56 55 59 255
+#define COLOR_ITEM_FOCUS 0 119 246 255
+#define COLOR_ITEM_FOCUS_0 0 119 246 0
 
 #endif /* __AIR_MEDIAHUB_DEFINE_H__ */
index 965493cce749e6c4e52726406c70f60d4ff46596..470bc93951566cb33c7562630175c34ef6e853e8 100644 (file)
@@ -26,6 +26,6 @@
 #define PART_THUMBNAIL_AREA "part.thumbnail_area"
 #define PART_BOTTOM_AREA "part.bottom_area"
 
-#define STYLE_MENU_BTN "menu_btn"
+#define STYLE_MENU_BTN "base_btn_menu"
 
 #endif /* __AIR_MEDIAHUB_VIEW_BASE_H__ */
index 8f01d571857491959c3d8bdf239b096f2a588119..4187a4872732f0a775ba098642c64299602d9399 100644 (file)
@@ -18,4 +18,5 @@
 
 collections {
        #include "widgets/button.edc"
+       #include "widgets/gengrid.edc"
 }
index b049524b39e3698b477f142b13767a7ff580525f..2113a5b50f63c87e00858833e4123ed01b888bfb 100644 (file)
@@ -19,7 +19,7 @@
 #define TRANSITION_TIME 0.17
 
 group {
-       name: "elm/button/base/menu_btn";
+       name: "elm/button/base/base_btn_menu";
        data.item: "focus_highlight" "on";
        parts {
                part {
@@ -125,6 +125,55 @@ group {
        }
 }
 
+group {
+       name: "elm/button/base/base_btn_index";
+       inherit: "elm/button/base/base_btn_menu";
+       data.item: "focus_highlight" "on";
+       parts {
+               part {
+                       name: "bg";
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 0 36;
+                               color: 0 0 0 0;
+                               fixed: 0 1;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_BTN_FOCUS;
+                       }
+               }
+               part {
+                       name: "elm.text";
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to: "bg";
+                               rel2.to: "bg";
+                               text {
+                                       font: FONT_LIGHT;
+                                       size: 36;
+                                       align: 0.0 0.5;
+                               }
+                               min: 82 0;
+                               align: 0.0 0.5;
+                               color: COLOR_TEXT_INDEX;
+                               align: 0.0 0.0;
+                               fixed: 1 1;
+                       }
+                       description {
+                               state: "focused" 0.0;
+                               inherit: "default" 0.0;
+                               text.font: "TizenSans";
+                               color: COLOR_TEXT_FOCUS;
+                       }
+               }
+       }
+}
+
 group {
        name: "elm/button/base/viewer_btn_prev";
        data.item, "focus_highlight" "on";
diff --git a/res/edc/widgets/gengrid.edc b/res/edc/widgets/gengrid.edc
new file mode 100644 (file)
index 0000000..3e9a631
--- /dev/null
@@ -0,0 +1,392 @@
+/*
+ * 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/gengrid/item/movie_item/default";
+       data.item: "selectraise" "on";
+       data.item: "texts" "elm.text";
+       data.item: "contents" "elm.swallow.icon";
+       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: 26 26;
+                               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";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to: "bg";
+                               rel2 {
+                                       to: "elm.bg.text";
+                                       relative: 1.0 0.0;
+                               }
+                               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: "elm.swallow.icon";
+                       type: SWALLOW;
+                       scale: 1;
+                       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_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: "elm.bg.text";
+                                       relative: 0.0 0.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: "elm.bg.text";
+                                       relative: 1.0 0.0;
+                               }
+                               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: "defaultbg_text";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "bg";
+                                       relative: 0.0 1.0;
+                               }
+                               rel2.to: "bg";
+                               min: 0 82;
+                               align: 0.5 1.0;
+                               color: COLOR_ITEM_BG;
+                               fixed: 0 1;
+                       }
+               }
+               part {
+                       name: "elm.bg.text";
+                       type: RECT;
+                       mouse_events: 0;
+                       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: "elm.padding.text.left";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to: "elm.bg.text";
+                               rel2 {
+                                       to: "elm.bg.text";
+                                       relative: 0.0 0.0;
+                               }
+                               min: 18 82;
+                               align: 0.0 0.0;
+                               fixed: 1 1;
+                       }
+               }
+               part {
+                       name: "elm.padding.text.right";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "elm.bg.text";
+                                       relative: 1.0 0.0;
+                               }
+                               rel2 {
+                                       to: "elm.bg.text";
+                                       relative: 1.0 0.0;
+                               }
+                               min: 18 82;
+                               align: 1.0 0.0;
+                               fixed: 1 1;
+                       }
+               }
+               part {
+                       name: "elm.text";
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "elm.padding.text.left";
+                                       relative: 1.0 0.0;
+                               }
+                               rel2 {
+                                       to: "elm.padding.text.right";
+                                       relative: 0.0 1.0;
+                               }
+                               text {
+                                       font: FONT_LIGHT;
+                                       size: 28;
+                                       align: 0.0 0.5;
+                               }
+                               color: COLOR_TEXT_FOCUS;
+                               map {
+                                       perspective_on: 1;
+                                       perspective: "map";
+                               }
+                       }
+                       description {
+                               state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: COLOR_TEXT_FOCUS;
+                               map.on: 1;
+                       }
+                       description {
+                               state: "selected_0" 0.0;
+                               inherit: "selected" 0.0;
+                       }
+               }
+       }
+       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: "elm.bg.text";
+                       target: "elm.text";
+                       after: "focus,in,anim";
+               }
+               program {
+                       name: "focus,in,anim";
+                       action: STATE_SET "selected" 0.0;
+                       target: "defaultbg";
+                       target: "elm.swallow.icon";
+                       target: "part_focus1";
+                       target: "part_focus2";
+                       target: "part_focus3";
+                       target: "elm.bg.text";
+                       transition: LINEAR 0.17;
+               }
+               program {
+                       name: "go_passive";
+                       signal: "elm,state,unfocused";
+                       source: "elm";
+                       action: STATE_SET "default" 0.0;
+                       target: "elm.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: "elm.bg.text";
+                       transition: LINEAR 0.17;
+                       after: "focus,out,anim,3";
+               }
+               program {
+                       name: "focus,out,anim,3";
+                       action: STATE_SET "default" 0.0;
+                       target: "elm.swallow.icon";
+                       target: "defaultbg";
+                       target: "part_focus1";
+                       target: "part_focus2";
+                       target: "part_focus3";
+                       target: "elm.bg.text";
+               }
+       }
+}