From ca8376dad016ec60f0d58cf2bb48ca3704616fbf Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Thu, 8 Mar 2012 19:07:57 +0900 Subject: [PATCH] add toolbar.edc and tabbar layout --- themes/tizen.edc | 1 + themes/widgets/layout.edc | 16 +- themes/widgets/naviframe.edc | 1 + themes/widgets/toolbar.edc | 1664 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1674 insertions(+), 8 deletions(-) create mode 100644 themes/widgets/toolbar.edc diff --git a/themes/tizen.edc b/themes/tizen.edc index 9afce1b..88f70f3 100644 --- a/themes/tizen.edc +++ b/themes/tizen.edc @@ -90,6 +90,7 @@ collections { #include "widgets/stackedicon.edc" #include "widgets/tickernoti.edc" #include "widgets/toggle.edc" +#include "widgets/toolbar.edc" /* sounds{ diff --git a/themes/widgets/layout.edc b/themes/widgets/layout.edc index c7ab731..34b6ccc 100644 --- a/themes/widgets/layout.edc +++ b/themes/widgets/layout.edc @@ -125,9 +125,9 @@ } } /*************************************************/ - /* elm_layout -> controlbar template style */ + /* elm_layout -> tabbar template style */ /*************************************************/ - group { name: "elm/layout/controlbar/default"; + group { name: "elm/layout/tabbar/default"; parts { part { name: "elm.swallow.bg"; type: SWALLOW; @@ -139,19 +139,19 @@ type: SWALLOW; scale: 1; description { state: "default" 0.0; - rel2.relative: 1.0 0.0; - rel2.to: "elm.swallow.controlbar"; + rel1.relative: 0.0 1.0; + rel1.to: "elm.swallow.tabbar"; } } - part { name: "elm.swallow.controlbar"; + part { name: "elm.swallow.tabbar"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: 0 CONTROLBAR_LARGE_HEIGHT_INC; fixed: 0 1; - rel1 { relative: 0.0 1.0; } - rel2 { relative: 1.0 1.0; } - align: 0.5 1.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 0.0; } + align: 0.5 0.0; } } } diff --git a/themes/widgets/naviframe.edc b/themes/widgets/naviframe.edc index 08eef54..1963e07 100644 --- a/themes/widgets/naviframe.edc +++ b/themes/widgets/naviframe.edc @@ -472,6 +472,7 @@ scale: 1; clip_to: "controlbar_clip"; description { state: "default" 0.0; + fixed: 1 1; rel1.to: "controlbar_bg"; rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; } } diff --git a/themes/widgets/toolbar.edc b/themes/widgets/toolbar.edc new file mode 100644 index 0000000..0663d18 --- /dev/null +++ b/themes/widgets/toolbar.edc @@ -0,0 +1,1664 @@ +/* + * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved + * + * PROPRIETARY/CONFIDENTIAL + * + * This software is the confidential and proprietary information of SAMSUNG + * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this + * software is owned by Samsung and you shall not disclose such Confidential + * Information and shall use it only in accordance with the terms of the license + * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no + * representations or warranties about the suitability of the software, either + * express or implied, including but not limited to the implied warranties of + * merchantability, fitness for a particular purpose, or non-infringement. + * SAMSUNG shall not be liable for any damages suffered by licensee arising out + * of or releated to this software. + * + */ + +#define ITEM_STATE_ENABLED 0 +#define ITEM_STATE_DISABLED 1 + +group { name: "elm/toolbar/base/default"; + images { + image: "00_winset_control_toolbar_bg.png" COMP; + } + parts { + part { name: "base"; + mouse_events: 1; + description { state: "default" 0.0; + image.normal: "00_winset_control_toolbar_bg.png"; + } + } + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + to: "base"; + offset: 2 2; + } + rel2 { + to: "base"; + offset: -3 -3; + } + } + } + part { name: "elm.swallow.content"; + clip_to: "clipper"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1.to: "clipper"; + rel2.to: "clipper"; + } + } + part { name: "event"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + } +} + +group { name: "elm/toolbar/item/default"; + images { + image: "00_winset_toolbar_press.png" COMP; + } + styles{ + style { name: "toolbar_style"; + base: "font=SLP:style=Medium font_size="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC" align=center color="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC" wrap=mixed ellipsis=1"; + tag: "br" "\n"; + tag: "ps" "ps"; + tag: "hilight" "+ font=SLP:style=Bold"; + tag: "b" "+ font=SLP:style=Bold"; + tag: "tab" "\t"; + } + } + + data.item: "transition_animation_on" "1"; + script { + public item_state = ITEM_STATE_ENABLED; + } + parts { + part { name: "bg"; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + image { + normal: "00_winset_toolbar_press.png"; + border: 3 3 3 3; + } + image.middle: SOLID; + fill.smooth: 0; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 255 255 255 0; + } + } + part { name: "padding_left_top"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel2.relative: 0.0 0.0; + min: 10 8; + fixed: 1 1; + visible: 1; + color: 0 0 0 0; + } + } + part { name: "padding_right_bottom"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 1.0 1.0; + min: 10 5; + fixed: 1 1; + visible: 1; + color: 0 0 0 0; + } + } + part { + name: "icon_rect"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 0; + fixed: 0 1; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + align: 0.5 0.0; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + fixed: 0 1; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + align: 0.5 0.0; + color: 0 0 0 0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } + } + part { name: "padding_after_icon"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; //when only icon or no icon is there + align: 0.0 0.0; + rel1 { + relative: 0.0 1.0; + to: "icon_rect"; + } + rel2.to: "icon_rect"; + fixed: 0 1; + min: 0 0; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } + } + part { name: "padding_before_text"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; //when only icon or no icon is there + align: 0.5 1.0; + rel1 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "elm.text"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_right_bottom"; + to_y: "elm.text"; + } + fixed: 0 1; + min: 0 0; + color: 0 0 0 0; + } + } + part { name: "elm.swallow.icon"; + type: SWALLOW; + scale: 1; + clip_to: "elm.icon.clipper"; + description { state: "default" 0.0; + visible: 0; + align: 0.5 0.0; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + fixed: 0 1; + } + description { state: "visible" 0.0; + fixed: 0 1; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_right_bottom"; + to_y: "padding_before_text"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + description { state: "icononly" 0.0; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + } + part { name: "elm.swallow.icon_new"; + type: SWALLOW; + scale: 1; + clip_to: "elm.icon_new.clipper"; + description { state: "default" 0.0; + visible: 0; + align: 0.5 0.0; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + fixed: 0 1; + } + description { state: "visible" 0.0; + fixed: 0 1; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_right_bottom"; + to_y: "padding_before_text"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + description { state: "icononly" 0.0; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + } + part { name: "elm.text"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + clip_to: "elm.text.clipper"; + description { state: "default" 0.0; + visible: 1; + rel1 { + relative: 1.0 1.0; + to_x: "padding_left_top"; + to_y: "padding_after_icon"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC; + fixed: 1 1; + text { + style: "toolbar_style"; + min: 0 1; + max: 0 1; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + part { name: "elm.text_new"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + clip_to: "elm.text_new.clipper"; + description { state: "default" 0.0; + visible: 1; + rel1 { + relative: 1.0 1.0; + to_x: "padding_left_top"; + to_y: "padding_after_icon"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC; + fixed: 1 1; + text { + style: "toolbar_style"; + min: 0 1; + max: 0 1; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + part { name: "elm.text.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + description { state: "animation" 0.0; + color: 255 255 255 0; + } + } + part { name: "elm.text_new.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + } + description { state: "animation" 0.0; + color: 255 255 255 255; + } + } + part { name: "elm.icon.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + description { state: "animation" 0.0; + color: 255 255 255 0; + } + } + part { name: "elm.icon_new.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + } + description { state: "animation" 0.0; + color: 255 255 255 255; + } + } + part { name: "event"; + type: RECT; + mouse_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + part { name: "event2"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + } + programs { + program { name: "pressed"; + signal: "mouse,down,1"; + source: "event"; + script { + if (get_int(item_state) != ITEM_STATE_DISABLED) + set_state(PART:"bg", "selected", 0.0); + } + transition: LINEAR 0.2; + } + program { name: "unpressed"; + signal: "mouse,up,1"; + source: "event2"; + action: STATE_SET "default" 0.0; + target: "bg"; + transition: LINEAR 0.1; + } + program { name: "go"; + signal: "mouse,up,1"; + source: "event"; + action: SIGNAL_EMIT "elm,action,click" "elm"; + } + program { name: "mouse,in"; + signal: "mouse,in"; + source: "event"; + action: SIGNAL_EMIT "elm,mouse,in" "elm"; + } + program { name: "mouse,out"; + signal: "mouse,out"; + source: "event"; + action: SIGNAL_EMIT "elm,mouse,out" "elm"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "bg"; + after: "disable_text"; + } + program { name: "disable_text"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.text", "disabled_visible", 0.0); + set_state(PART:"elm.text_new", "disabled_visible", 0.0); + } + else + { + set_state(PART:"elm.text", "disabled", 0.0); + set_state(PART:"elm.text_new", "disabled", 0.0); + } + set_int(item_state, ITEM_STATE_DISABLED); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg"; + after: "enable_text"; + } + program { name: "enable_text"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "disabled_visible")) + { + set_state(PART:"elm.text", "visible", 0.0); + set_state(PART:"elm.text_new", "visible", 0.0); + } + else + { + set_state(PART:"elm.text", "default", 0.0); + set_state(PART:"elm.text_new", "default", 0.0); + } + set_int(item_state, ITEM_STATE_ENABLED); + } + } + program { name: "label_set,animation,forward"; + signal: "elm,state,label_set,forward"; + source: "elm"; + after: "label_set,animation"; + } + program { name: "label_set,animation,backward"; + signal: "elm,state,label_set,backward"; + source: "elm"; + after: "label_set,animation"; + } + program { name: "label_set,animation"; + signal: "elm,state,label_set"; + source: "elm"; + action: STATE_SET "animation" 0.0; + target: "elm.text.clipper"; + target: "elm.text_new.clipper"; + transition: LINEAR 0.2; + after: "label_set,animation,done"; + } + program { name: "label_set,animation,done"; + action: SIGNAL_EMIT "elm,state,label_set,done" "elm"; + } + program { name: "label,reset"; + signal: "elm,state,label,reset"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.text.clipper"; + target: "elm.text_new.clipper"; + } + program { name: "icon_set,animation,forward"; + signal: "elm,state,icon_set,forward"; + source: "elm"; + after: "icon_set,animation"; + } + program { name: "icon_set,animation,backward"; + signal: "elm,state,icon_set,backward"; + source: "elm"; + after: "icon_set,animation"; + } + program { name: "icon_set,animation"; + signal: "elm,state,icon_set"; + source: "elm"; + action: STATE_SET "animation" 0.0; + target: "elm.icon.clipper"; + target: "elm.icon_new.clipper"; + transition: LINEAR 0.2; + after: "icon_set,animation,done"; + } + program { name: "icon_set,animation,done"; + action: SIGNAL_EMIT "elm,state,icon_set,done" "elm"; + } + program { name: "icon,reset"; + signal: "elm,state,icon,reset"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.icon.clipper"; + target: "elm.icon_new.clipper"; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.icon", st, 30, vl); + if (!strcmp(st, "icononly")) + { + set_state(PART:"elm.swallow.icon", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "visible", 0.0); + } + set_state(PART:"elm.text", "visible", 0.0); + } + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.icon", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.icon", "icononly", 0.0); + set_state(PART:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); + } + set_state(PART:"elm.text", "default", 0.0); + } + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.icon", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "visible", 0.0); + } + else + { + set_state(PART:"elm.swallow.icon", "icononly", 0.0); + set_state(PART:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); + } + } + } + } +} + +group { name: "elm/toolbar/item/item_horizontal"; + inherit: "elm/toolbar/item/default"; + script { + public item_state = ITEM_STATE_ENABLED; + } + parts { + part { name: "icon_rect"; + description { state: "default" 0.0; + fixed: 1 0; + align: 0.0 0.5; + } + description { state: "visible" 0.0; + fixed: 1 0; + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + align: 0.0 0.5; + } + } + part { name: "padding_after_icon"; + description { state: "default" 0.0; //when only icon or no icon is there + rel1.relative: 1.0 0.0; + fixed: 1 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + min: 6 0; + } + } + part { name: "padding_before_text"; + description { state: "default" 0.0; //when only icon or no icon is there + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "elm.text"; + to_y: "padding_left_top"; + } + rel2 { + to_x: "elm.text"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + min: 6 0; + } + } + part { name: "elm.swallow.icon"; + description { state: "default" 0.0; + align: 0.0 0.5; + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "padding_before_text"; + to_y: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_before_text"; + to_y: "padding_right_bottom"; + } + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.swallow.icon_new"; + description { state: "default" 0.0; + align: 0.0 0.5; + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "padding_before_text"; + to_y: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_before_text"; + to_y: "padding_right_bottom"; + } + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.text"; + type: TEXTBLOCK; + description { state: "default" 0.0; + rel1 { + relative: 1.0 1.0; + to_x: "padding_after_icon"; + to_y: "padding_left_top"; + } + text { + style: "toolbar_style"; + min: 1 0; + max: 1 0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + part { name: "elm.text_new"; + type: TEXTBLOCK; + description { state: "default" 0.0; + rel1 { + relative: 1.0 1.0; + to_x: "padding_after_icon"; + to_y: "padding_left_top"; + } + text { + style: "toolbar_style"; + min: 1 0; + max: 1 0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + } +} + +group { name: "elm/toolbar/separator/default"; + images { + image: "separator_v.png" COMP; + } + parts { + part { name: "separator"; // separator group + description { state: "default" 0.0; + min: 2 2; + max: 2 9999; + rel1.offset: 4 4; + rel2.offset: -5 -5; + image { + normal: "separator_v.png"; + } + fill { + smooth: 0; + } + } + } + } +} + +group { name: "elm/toolbar/object/default"; + parts { + part { name: "elm.swallow.object"; // object group + type: SWALLOW; + description { + state: "default" 0.0; + } + } + } +} + +group { name: "elm/toolbar/base/tabbar"; + images { + image: "00_winset_control_tabbar_bg_top.png" COMP; + } + + parts { + part { name: "base"; + mouse_events: 1; + description { state: "default" 0.0; + image.normal: "00_winset_control_tabbar_bg_top.png"; + } + } + part { name: "clipper"; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + to: "base"; + offset: 2 2; + } + rel2 { + to: "base"; + offset: -3 -3; + } + } + } + part { name: "elm.swallow.content"; + clip_to: "clipper"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1.to: "clipper"; + rel2.to: "clipper"; + } + } + part { name: "event"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + } +} + +group { name: "elm/toolbar/item/tabbar"; + alias: "elm/toolbar/item/tabbar/item_horizontal"; + images { + image: "00_winset_tabbar_focus.png" COMP; + } + + data.item: "transition_animation_on" "1"; + parts { + part { name: "bg"; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + image { + normal: "00_winset_tabbar_focus.png"; + } + image.middle: SOLID; + fill.smooth: 0; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 255 255 255 0; + } + } + part { name: "padding_left_top"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel2.relative: 0.0 0.0; + min: 10 8; + fixed: 1 1; + visible: 1; + color: 0 0 0 0; + } + } + part { name: "padding_right_bottom"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 1.0 1.0; + min: 10 5; + fixed: 1 1; + visible: 1; + color: 0 0 0 0; + } + } + part { + name: "icon_rect"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 0; + fixed: 0 1; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + align: 0.5 0.0; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + fixed: 0 1; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + align: 0.5 0.0; + color: 0 0 0 0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } + } + part { name: "padding_after_icon"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; //when only icon or no icon is there + align: 0.0 0.0; + rel1 { + relative: 0.0 1.0; + to: "icon_rect"; + } + rel2.to: "icon_rect"; + fixed: 0 1; + min: 0 0; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + align: 0.0 0.0; + rel1 { + relative: 0.0 1.0; + to: "icon_rect"; + } + rel2.to: "icon_rect"; + fixed: 0 1; + min: 0 0; + color: 0 0 0 0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } + } + part { name: "padding_before_text"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; //when only icon or no icon is there + align: 0.5 1.0; + rel1 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "elm.text"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_right_bottom"; + to_y: "elm.text"; + } + fixed: 0 1; + min: 0 0; + color: 0 0 0 0; + } + } + part { name: "elm.swallow.icon"; + type: SWALLOW; + scale: 1; + clip_to: "elm.icon.clipper"; + description { state: "default" 0.0; + visible: 0; + align: 0.5 0.0; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + fixed: 0 1; + } + description { state: "visible" 0.0; + fixed: 0 1; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_right_bottom"; + to_y: "padding_before_text"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + description { state: "icononly" 0.0; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + } + part { name: "elm.swallow.icon_new"; + type: SWALLOW; + scale: 1; + clip_to: "elm.icon_new.clipper"; + description { state: "default" 0.0; + visible: 0; + align: 0.5 0.0; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + to_y: "padding_left_top"; + } + fixed: 0 1; + } + description { state: "visible" 0.0; + fixed: 0 1; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_right_bottom"; + to_y: "padding_before_text"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + description { state: "icononly" 0.0; + min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + } + } + part { name: "elm.text"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + clip_to: "elm.text.clipper"; + description { state: "default" 0.0; + visible: 1; + rel1 { + relative: 1.0 1.0; + to_x: "padding_left_top"; + to_y: "padding_after_icon"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC; + fixed: 1 1; + text { + style: "toolbar_style"; + min: 0 1; + max: 0 1; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + part { name: "elm.text_new"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + clip_to: "elm.text_new.clipper"; + description { state: "default" 0.0; + visible: 1; + rel1 { + relative: 1.0 1.0; + to_x: "padding_left_top"; + to_y: "padding_after_icon"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC; + fixed: 1 1; + text { + style: "toolbar_style"; + min: 0 1; + max: 0 1; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + part { name: "elm.text.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + description { state: "animation" 0.0; + color: 255 255 255 0; + } + } + part { name: "elm.text_new.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + } + description { state: "animation" 0.0; + color: 255 255 255 255; + } + } + part { name: "elm.icon.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + description { state: "animation" 0.0; + color: 255 255 255 0; + } + } + part { name: "elm.icon_new.clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + } + description { state: "animation" 0.0; + color: 255 255 255 255; + } + } + part { name: "event"; + type: RECT; + mouse_events: 1; + ignore_flags: ON_HOLD; + 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: "bg"; + transition: LINEAR 0.2; + } + program { name: "go_passive"; + signal: "elm,state,unselected"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg"; + transition: LINEAR 0.1; + }/* + program { name: "pressed"; + signal: "mouse,down,1"; + source: "event"; + action: STATE_SET "selected" 0.0; + target: "bg"; + target: "elm.text"; + target: "elm.text_new"; + transition: LINEAR 0.2; + } + program { name: "unpressed"; + signal: "mouse,up,1"; + source: "event"; + action: STATE_SET "default" 0.0; + target: "bg"; + target: "elm.text"; + target: "elm.text_new"; + transition: LINEAR 0.1; + }*/ + program { name: "go"; + signal: "mouse,up,1"; + source: "event"; + action: SIGNAL_EMIT "elm,action,click" "elm"; + } + program { name: "mouse,in"; + signal: "mouse,in"; + source: "event"; + action: SIGNAL_EMIT "elm,mouse,in" "elm"; + } + program { name: "mouse,out"; + signal: "mouse,out"; + source: "event"; + action: SIGNAL_EMIT "elm,mouse,out" "elm"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "bg"; + after: "disable_text"; + } + program { name: "disable_text"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.text", "disabled_visible", 0.0); + set_state(PART:"elm.text_new", "disabled_visible", 0.0); + } + else + { + set_state(PART:"elm.text", "disabled", 0.0); + set_state(PART:"elm.text_new", "disabled", 0.0); + } + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg"; + after: "enable_text"; + } + program { name: "enable_text"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "disabled_visible")) + { + set_state(PART:"elm.text", "visible", 0.0); + set_state(PART:"elm.text_new", "visible", 0.0); + } + else + { + set_state(PART:"elm.text", "default", 0.0); + set_state(PART:"elm.text_new", "default", 0.0); + } + } + } + program { name: "label_set,animation,forward"; + signal: "elm,state,label_set,forward"; + source: "elm"; + after: "label_set,animation"; + } + program { name: "label_set,animation,backward"; + signal: "elm,state,label_set,backward"; + source: "elm"; + after: "label_set,animation"; + } + program { name: "label_set,animation"; + signal: "elm,state,label_set"; + source: "elm"; + action: STATE_SET "animation" 0.0; + target: "elm.text.clipper"; + target: "elm.text_new.clipper"; + transition: LINEAR 0.2; + after: "label_set,animation,done"; + } + program { name: "label_set,animation,done"; + action: SIGNAL_EMIT "elm,state,label_set,done" "elm"; + } + program { name: "label,reset"; + signal: "elm,state,label,reset"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.text.clipper"; + target: "elm.text_new.clipper"; + } + program { name: "icon_set,animation,forward"; + signal: "elm,state,icon_set,forward"; + source: "elm"; + after: "icon_set,animation"; + } + program { name: "icon_set,animation,backward"; + signal: "elm,state,icon_set,backward"; + source: "elm"; + after: "icon_set,animation"; + } + program { name: "icon_set,animation"; + signal: "elm,state,icon_set"; + source: "elm"; + action: STATE_SET "animation" 0.0; + target: "elm.icon.clipper"; + target: "elm.icon_new.clipper"; + transition: LINEAR 0.2; + after: "icon_set,animation,done"; + } + program { name: "icon_set,animation,done"; + action: SIGNAL_EMIT "elm,state,icon_set,done" "elm"; + } + program { name: "icon,reset"; + signal: "elm,state,icon,reset"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.icon.clipper"; + target: "elm.icon_new.clipper"; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.icon", st, 30, vl); + if (!strcmp(st, "icononly")) + { + set_state(PART:"elm.swallow.icon", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "visible", 0.0); + } + set_state(PART:"elm.text", "visible", 0.0); + } + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.icon", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.icon", "icononly", 0.0); + set_state(PART:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); + } + set_state(PART:"elm.text", "default", 0.0); + } + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.icon", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "visible", 0.0); + } + else + { + set_state(PART:"elm.swallow.icon", "icononly", 0.0); + set_state(PART:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); + } + } + } + } +} + +group { name: "elm/toolbar/item/tabbar/item_horizontal"; + inherit: "elm/toolbar/item/tabbar"; + script { + public item_state = ITEM_STATE_ENABLED; + } + parts { + part { name: "icon_rect"; + description { state: "default" 0.0; + fixed: 1 0; + align: 0.0 0.5; + } + description { state: "visible" 0.0; + fixed: 1 0; + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + align: 0.0 0.5; + } + } + part { name: "padding_after_icon"; + description { state: "default" 0.0; //when only icon or no icon is there + rel1.relative: 1.0 0.0; + fixed: 1 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + min: 6 0; + } + } + part { name: "padding_before_text"; + description { state: "default" 0.0; //when only icon or no icon is there + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "elm.text"; + to_y: "padding_left_top"; + } + rel2 { + to_x: "elm.text"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + min: 6 0; + } + } + part { name: "elm.swallow.icon"; + description { state: "default" 0.0; + align: 0.0 0.5; + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "padding_before_text"; + to_y: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_before_text"; + to_y: "padding_right_bottom"; + } + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.swallow.icon_new"; + description { state: "default" 0.0; + align: 0.0 0.5; + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "padding_before_text"; + to_y: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_before_text"; + to_y: "padding_right_bottom"; + } + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.text"; + type: TEXTBLOCK; + description { state: "default" 0.0; + rel1 { + relative: 1.0 1.0; + to_x: "padding_after_icon"; + to_y: "padding_left_top"; + } + text { + style: "toolbar_style"; + min: 1 0; + max: 1 0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + part { name: "elm.text_new"; + type: TEXTBLOCK; + description { state: "default" 0.0; + rel1 { + relative: 1.0 1.0; + to_x: "padding_after_icon"; + to_y: "padding_left_top"; + } + text { + style: "toolbar_style"; + min: 1 0; + max: 1 0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC; + } + } + } +} + -- 2.7.4