diff options
Diffstat (limited to 'main-app/res/edje/contacts/settings_layout.edc')
-rw-r--r-- | main-app/res/edje/contacts/settings_layout.edc | 650 |
1 files changed, 650 insertions, 0 deletions
diff --git a/main-app/res/edje/contacts/settings_layout.edc b/main-app/res/edje/contacts/settings_layout.edc new file mode 100644 index 0000000..9394900 --- /dev/null +++ b/main-app/res/edje/contacts/settings_layout.edc @@ -0,0 +1,650 @@ +/* + * Copyright (c) 2009-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. + * + */ + +#include "genlist_macro.edc" +#include "WVGA-inc.edc" + +#define SOUND_PATH "../sounds/" +#define IMAGE_PATH "./contacts/images/WVGA/contact_images/" + + +#define CONTACTS_TABBAR_ICON_TEXT_PAD_INC 8 0 +#define CONTACTS_TABBAR_ICON_SIZE_INC 32 32 +#define ITEM_STATE_ENABLED 0 +#define ITEM_STATE_DISABLED 1 +#define TAG \ + tag: "br" "\n"; \ + tag: "ps" "ps"; \ + tag: "hilight" "+ font_weight=Bold"; \ + tag: "b" "+ font_weight=Bold"; \ + tag: "tab" "\t"; + +collections { + base_scale: 2.6; + plugins { + plugin { + name: "touch_sound"; // Name run by RUN_PLUGIN + source: "feedback"; // External edje plugin name + param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP"; + } + } + group { name: "elm/toolbar/item/contacts_tabbar_with_title"; + script { + public selected = 0; + public pressed = 0; + public item_state = ITEM_STATE_ENABLED; + public items_number = 0; + public icon_text = 0; + public mouse_down = 0; + public multi_down = 0; + public landscape = 0; + public item_text = 0; + } + parts { + part { name: "bg"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + } + description { state: "2items" 0.0; + inherit: "default" 0.0; + min: TABBAR_TWO_ITEMS_SIZE_INC; + } + description { state: "2items_land" 0.0; + inherit: "default" 0.0; + min: TABBAR_LANDSCAPE_TWO_ITEMS_SIZE_INC; + } + } + part { name: "selected_line"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to_x: "elm.swallow.icon.rect"; + to_y: "elm.text"; + relative: 0.0 1.0; + } + rel2 { + to: "elm.text"; + relative: 1.0 1.0; + } + fixed: 0 1; + min: TABBAR_SELECTED_LINE_SIZE_INC; + visible: 0; + align: 0.5 0.0; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "bg_cover"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "padding_left_top"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel2.relative: 0.0 0.0; + min: 0 0; + fixed: 1 1; + } + description { state: "text" 0.0; + inherit: "default" 0.0; + min: TABBAR_TEXT_LEFT_TOP_PADDING_SIZE_INC; + } + description { state: "icon_text" 0.0; + inherit: "default" 0.0; + min: TABBAR_ICON_TEXT_LAND_LEFT_TOP_PADDING_SIZE_INC; + } + } + part { name: "padding_right_bottom"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 1.0 1.0; + min: 0 0; + fixed: 1 1; + } + description { state: "text" 0.0; + inherit: "default" 0.0; + min: TABBAR_TEXT_RIGHT_BOTTOM_PADDING_SIZE_INC; + } + description { state: "icon_text" 0.0; + inherit: "default" 0.0; + min: TABBAR_ICON_TEXT_LAND_RIGHT_BOTTOM_PADDING_SIZE_INC; + } + } + part { + name: "icon_rect"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 0; + fixed: 1 0; + rel2 { + relative: 0.0 1.0; + } + align: 0.0 0.5; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + min: TABBAR_ICON_RECT_SIZE_INC; + } + } + + part { name: "padding_icon_text"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + fixed: 1 0; + align: 1.0 0.5; + rel1 { + to_x: "elm.text"; + relative: 0.0 0.0; + } + rel2 { + to_x: "elm.text"; + relative: 0.0 1.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + min: CONTACTS_TABBAR_ICON_TEXT_PAD_INC; + } + } + part { name: "elm.swallow.icon.rect"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + fixed: 1 1; + align: 1.0 0.5; + visible: 0; + rel1 { + to_x: "padding_icon_text"; + relative: 0.0 0.0; + } + rel2 { + to_x: "padding_icon_text"; + relative: 0.0 1.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + min: CONTACTS_TABBAR_ICON_SIZE_INC; + max: CONTACTS_TABBAR_ICON_SIZE_INC; + } + } + part { name: "elm.swallow.icon"; + type: SWALLOW; + scale: 1; + clip_to: "elm.icon.clipper"; + description { state: "default" 0.0; + visible: 0; + min: CONTACTS_TABBAR_ICON_SIZE_INC; + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + rel1 { + to: "elm.swallow.icon.rect"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.swallow.icon.rect"; + relative: 1.0 1.0; + } + } + description { state: "visible_icon_only" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + rel1 { + to: "padding_left_top"; + relative: 1.0 1.0; + } + rel2 { + to: "padding_right_bottom"; + relative: 0.0 0.0; + } + } + } + part { name: "elm.text"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + clip_to: "elm.text.clipper"; + description { state: "default" 0.0; + visible: 0; + } + description { state: "text" 0.0; + inherit: "default" 0.0; + visible: 1; + rel1 { + to: "padding_left_top"; + relative: 1.0 1.0; + } + rel2 { + to: "padding_right_bottom"; + relative: 0.0 0.0; + } + fixed: 1 1; + text { + style: "tabbar_text_style_T1117"; + min: 0 1; + max: 1 0; + } + } + description { state:"text_pressed" 0.0; + inherit: "text" 0.0; + text.style: "tabbar_text_style_T1117P"; + } + description { state:"text_selected" 0.0; + inherit: "text" 0.0; + text.style: "tabbar_text_style_T1117S"; + } + description { state:"text_disabled" 0.0; + inherit: "text" 0.0; + text.style: "tabbar_text_style_T1117D"; + } + description { state: "icon_text" 0.0; + inherit: "default" 0.0; + visible: 1; + rel1 { + to_x: "icon_rect"; + to_y: "padding_left_top"; + relative: 1.0 1.0; + } + rel2 { + to: "padding_right_bottom"; + relative: 0.0 0.0; + } + fixed: 1 1; + text { + style: "tabbar_icon_text_style_T111"; + min: 0 1; + max: 1 0; + } + } + description { state:"icon_text_pressed" 0.0; + inherit: "icon_text" 0.0; + text.style: "tabbar_icon_text_style_T111P"; + } + description { state:"icon_text_selected" 0.0; + inherit: "icon_text" 0.0; + text.style: "tabbar_icon_text_style_T111S"; + } + description { state:"icon_text_disabled" 0.0; + inherit: "icon_text" 0.0; + text.style: "tabbar_icon_text_style_T111D"; + } + } + part { name: "elm.icon.clipper"; + type: RECT; + description { state: "default" 0.0; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + } + } + part { name: "elm.text.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + part { name: "event"; + type: RECT; + mouse_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + } + programs { + program { name: "go_active"; + signal: "elm,state,selected"; + source: "elm"; + action: STATE_SET "selected" 0.0; + target: "elm.icon.clipper"; + target: "selected_line"; + after: "selected_text"; + } + program { name: "selected_text"; + script{ + set_int(selected, 1); + if (!get_int(icon_text)) + set_state(PART:"elm.text", "text_selected", 0.0); + else + set_state(PART:"elm.text", "icon_text_selected", 0.0); + } + } + program { name: "go_passive"; + signal: "elm,state,unselected"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.icon.clipper"; + target: "selected_line"; + after: "unselected_text"; + } + program { name: "unselected_text"; + script{ + set_int(selected, 0); + if (!get_int(icon_text)) + set_state(PART:"elm.text", "text", 0.0); + else + set_state(PART:"elm.text", "icon_text", 0.0); + } + } + program { name: "key,pressed"; + signal: "elm,action,pressed"; + source: "elm"; + after: "pressed"; + } + program { name: "pressed"; + signal: "mouse,down,1"; + source: "event"; + script { + if ((get_int(item_state) != ITEM_STATE_DISABLED) + && get_int(multi_down) == 0 + && get_int(mouse_down) == 0) + { + set_int(mouse_down, 1); + set_state(PART:"bg_cover", "pressed", 0.0); + if (!get_int(icon_text)) + set_state(PART:"elm.text", "text_pressed", 0.0); + else + set_state(PART:"elm.text", "icon_text_pressed", 0.0); + set_state(PART:"elm.icon.clipper", "pressed", 0.0); + set_int(pressed, 1); + } + } + } + program { name: "key,unpressed"; + signal: "elm,action,unpressed"; + source: "elm"; + after: "unpressed"; + } + program { name: "unpressed"; + signal: "mouse,up,1"; + source: "event"; + script { + if ((get_int(item_state) != ITEM_STATE_DISABLED) + && get_int(mouse_down) == 1) + { + set_int(mouse_down, 0); + set_int(pressed, 0); + set_state(PART:"bg_cover", "default", 0.0); + if (get_int(selected)) + { + if (!get_int(icon_text)) + set_state(PART:"elm.text", "text_selected", 0.0); + else + set_state(PART:"elm.text", "icon_text_selected", 0.0); + set_state(PART:"elm.icon.clipper", "selected", 0.0); + } + else + { + if (!get_int(icon_text)) + set_state(PART:"elm.text", "text", 0.0); + else + set_state(PART:"elm.text", "icon_text", 0.0); + set_state(PART:"elm.icon.clipper", "default", 0.0); + } + } + } + } + program { name: "go"; + signal: "mouse,clicked,1"; + source: "event"; + script { + if (get_int(multi_down) == 0) { + emit("elm,action,click", "elm"); + if (get_int(item_state) != ITEM_STATE_DISABLED) + run_program(PROGRAM:"touch_sound"); + } + } + } + program { name: "touch_sound"; + action: RUN_PLUGIN "touch_sound"; + } + program { name: "mouse,in"; + signal: "mouse,in"; + source: "event"; + script { + if (get_int(multi_down) == 0) + emit("elm,mouse,in", "elm"); + } + } + program { name: "mouse,out"; + signal: "mouse,out"; + source: "event"; + script { + if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) + emit("elm,mouse,out", "elm"); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + script { + set_int(item_state, ITEM_STATE_ENABLED); + set_state(PART:"bg_cover", "default", 0.0); + if (!get_int(icon_text)) + { + if (!get_int(selected)) + set_state(PART:"elm.text", "text", 0.0); + else + set_state(PART:"elm.text", "text_selected", 0.0); + } + else + { + if (!get_int(selected)) + set_state(PART:"elm.text", "icon_text", 0.0); + else + set_state(PART:"elm.text", "icon_text_selected", 0.0); + } + set_state(PART:"elm.text.clipper", "default", 0.0); + set_state(PART:"elm.icon.clipper", "default", 0.0); + } + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + script { + set_int(item_state, ITEM_STATE_DISABLED); + set_state(PART:"bg_cover", "disabled", 0.0); + if (!get_int(icon_text)) + set_state(PART:"elm.text", "text_disabled", 0.0); + else + set_state(PART:"elm.text", "icon_text_disabled", 0.0); + set_state(PART:"elm.text.clipper", "disabled", 0.0); + set_state(PART:"elm.icon.clipper", "disabled", 0.0); + } + } + program {name: "multi_down"; + signal: "elm,action,multi,down"; + source: "elm"; + script { + set_int(multi_down, 1); + } + } + program {name: "multi_up"; + signal: "elm,action,multi,cancel"; + source: "elm"; + script { + set_int(multi_down, 0); + } + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + set_int(item_text, 1); + if (!get_int(icon_text)) + { + set_state(PART:"elm.text", "text", 0.0); + set_state(PART:"padding_left_top", "text", 0.0); + set_state(PART:"padding_right_bottom", "text", 0.0); + } + else + { + set_state(PART:"elm.swallow.icon", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"elm.text", "icon_text", 0.0); + set_state(PART:"padding_left_top", "icon_text", 0.0); + set_state(PART:"padding_right_bottom", "icon_text", 0.0); + } + } + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + script { + set_int(item_text, 0); + set_state(PART:"elm.text", "default", 0.0); + } + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + script { + set_int(icon_text, 1); + if (get_int(item_text)) + { + set_state(PART:"elm.swallow.icon", "visible", 0.0); + set_state(PART:"padding_icon_text", "visible", 0.0); + set_state(PART:"elm.swallow.icon.rect", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"elm.text", "icon_text", 0.0); + } + else + set_state(PART:"elm.swallow.icon", "visible_icon_only", 0.0); + set_state(PART:"padding_left_top", "icon_text", 0.0); + set_state(PART:"padding_right_bottom", "icon_text", 0.0); + } + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + script { + set_int(icon_text, 0); + set_state(PART:"elm.swallow.icon", "default", 0.0); + set_state(PART:"padding_icon_text", "default", 0.0); + set_state(PART:"elm.swallow.icon.rect", "default", 0.0); + set_state(PART:"elm.text", "text", 0.0); + set_state(PART:"padding_left_top", "text", 0.0); + set_state(PART:"padding_right_bottom", "text", 0.0); + } + } + program { name: "tab_item_2"; + signal: "elm,number,item,2"; + source: "elm"; + script { + set_int(items_number, 2); + set_state(PART:"bg", "2items", 0.0); + } + } + program { name: "tab_item_upper_5"; + script { + if (get_int(landscape)) + set_state(PART:"bg", "scrollable_land", 0.0); + else + set_state(PART:"bg", "scrollable", 0.0); + } + } + program { + name: "change_to_landscape"; + script { + if (!get_int(landscape)) { + set_int(landscape, 1); + if (get_int(items_number) == 2) + set_state(PART:"bg", "2items_land", 0.0); + } + } + } + program { + name: "change_to_portrait"; + script { + if (get_int(landscape)) { + set_int(landscape, 0); + if (get_int(items_number) == 2) + set_state(PART:"bg", "2items", 0.0); + } + } + } + program { name: "landscape_mode"; + source: "elm"; + signal: "elm,state,orient,90"; + after: "change_to_landscape"; + } + program { name: "landscape_mode2"; + source: "elm"; + signal: "elm,state,orient,270"; + after: "change_to_landscape"; + } + program { name: "portrait_mode"; + source: "elm"; + signal: "elm,state,orient,0"; + after: "change_to_portrait"; + } + program { name: "portrait_mode2"; + source: "elm"; + signal: "elm,state,orient,180"; + after: "change_to_portrait"; + } + } + } + +} |