/* * efl-theme-tizen * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. * * 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. */ #define ITEM_STATE_ENABLED 0 #define ITEM_STATE_DISABLED 1 #define TOOLBAR_TEXT_STYLE(_font_size) \ style { name: "toolbar_text_style_"_font_size; \ base: "font=Tizen:style=Medium style=far_shadow,bottom shadow_color=#ffffffff font_size="_font_size" align=center color="TABBAR_ITEM_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=-10"; \ tag: "br" "\n"; \ tag: "ps" "ps"; \ tag: "hilight" "+ font=Tizen:style=Bold"; \ tag: "b" "+ font=Tizen:style=Bold"; \ tag: "tab" "\t"; \ } #define TOOLBAR_SELECTED_TEXT_STYLE(_font_size) \ style { name: "toolbar_selected_text_style_"_font_size; \ base: "font=Tizen:style=Medium style=far_shadow,bottom shadow_color=#ffffffff font_size="_font_size" align=center color="TABBAR_ITEM_SELECTED_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=-10"; \ tag: "br" "\n"; \ tag: "ps" "ps"; \ tag: "hilight" "+ font=Tizen:style=Bold"; \ tag: "b" "+ font=Tizen:style=Bold"; \ tag: "tab" "\t"; \ } styles{ TOOLBAR_TEXT_STYLE(24) TOOLBAR_TEXT_STYLE(28) TOOLBAR_TEXT_STYLE(30) TOOLBAR_SELECTED_TEXT_STYLE(24) TOOLBAR_SELECTED_TEXT_STYLE(28) TOOLBAR_SELECTED_TEXT_STYLE(30) } group { name: "elm/toolbar/base/default"; parts { part { name: "base"; type: RECT; mouse_events: 1; description { state: "default" 0.0; color: 248 246 239 255; } } 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_tab_press.png" COMP; } data.item: "transition_animation_on" "1"; script { public item_state = ITEM_STATE_ENABLED; public items_number = 0; } parts { part { name: "bg"; mouse_events: 0; description { state: "default" 0.0; visible: 0; color: 255 255 255 0; rel1 { relative: 0.0 0.0; offset: TOOLBAR_ITEM_BG_REL1_OFFSET_INC; } rel2 { relative: 1.0 1.0; offset: TOOLBAR_ITEM_BG_REL2_OFFSET_INC; } image { normal: "00_tab_press.png"; border: TOOLBAR_ITEM_BG_SELECTED_BORDER_INC; } 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: TABBAR_ITEM_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: TABBAR_ITEM_ICON_SIZE_INC; max: TABBAR_ITEM_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: TABBAR_ITEM_ICON_SIZE_INC; max: TABBAR_ITEM_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: TABBAR_ITEM_ICON_SIZE_INC; max: TABBAR_ITEM_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: TABBAR_ITEM_ICON_SIZE_INC; max: TABBAR_ITEM_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: 0; 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_text_style_26"; min: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "visible_30" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_30"; visible: 1; } description { state: "visible_32" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_32"; visible: 1; } description { state: "visible_36" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_36"; visible: 1; } } part { name: "elm.text_new"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "elm.text_new.clipper"; description { state: "default" 0.0; visible: 0; 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_text_style_26"; min: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "visible_30" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_30"; visible: 1; } description { state: "visible_32" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_32"; visible: 1; } description { state: "visible_36" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_36"; visible: 1; } } 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; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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,clicked,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"; script { set_int(item_state, ITEM_STATE_DISABLED); set_state(PART:"bg", "disabled", 0.0); set_state(PART:"elm.text.clipper", "disabled", 0.0); set_state(PART:"elm.icon.clipper", "disabled", 0.0); run_program(PROGRAM:"label_set,animation,done"); run_program(PROGRAM:"icon_set,animation,done"); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; script { set_int(item_state, ITEM_STATE_ENABLED); set_state(PART:"bg", "default", 0.0); set_state(PART:"elm.text.clipper", "default", 0.0); set_state(PART:"elm.icon.clipper", "default", 0.0); run_program(PROGRAM:"label_set,animation,done"); run_program(PROGRAM:"icon_set,animation,done"); } } program { name: "label_set,animation,forward"; signal: "elm,state,label_set,forward"; source: "elm"; after: "label_set,sync"; } program { name: "label_set,animation,backward"; signal: "elm,state,label_set,backward"; source: "elm"; after: "label_set,sync"; } program { name: "label_set,sync"; signal: "elm,state,label_set"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); set_state(PART:"elm.text_new", st, vl); } after: "label_set,animation"; } program { name: "label_set,animation"; 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"; script { set_state(PART:"elm.text_new.clipper", "default", 0.0); if (get_int(item_state) != ITEM_STATE_DISABLED) set_state(PART:"elm.text.clipper", "default", 0.0); else set_state(PART:"elm.text.clipper", "disabled", 0.0); } } 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"; script { set_state(PART:"elm.icon_new.clipper", "default", 0.0); if (get_int(item_state) != ITEM_STATE_DISABLED) set_state(PART:"elm.icon.clipper", "default", 0.0); else set_state(PART:"elm.icon.clipper", "disabled", 0.0); } } 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); } if (strcmp(st, "default")) { set_state(PART:"elm.text", "visible", 0.0); } else { if (get_int(items_number) <= 3) set_state(PART:"elm.text", "visible_32", 0.0); else if (get_int(items_number) >= 4) set_state(PART:"elm.text", "visible_30", 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 (!strncmp(st, "visible", 7)) { 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); } 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); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strncmp(st, "visible", 7)) { if (get_int(items_number) <= 3) set_state(PART:"elm.text", "visible_32", 0.0); else if (get_int(items_number) >= 4) set_state(PART:"elm.text", "visible_30", 0.0); } set_state(PART:"elm.swallow.icon", "default", 0.0); set_state(PART:"icon_rect", "default", 0.0); set_state(PART:"padding_after_icon", "default", 0.0); } } program { name: "text_only_item_1"; signal: "elm,number,item,1"; source: "elm"; script { set_int(items_number, 1); } after: "text_only_item_under_3"; } program { name: "text_only_item_2"; signal: "elm,number,item,2"; source: "elm"; script { set_int(items_number, 2); } after: "text_only_item_under_3"; } program { name: "text_only_item_3"; signal: "elm,number,item,3"; source: "elm"; script { set_int(items_number, 3); } after: "text_only_item_under_3"; } program { name: "text_only_item_under_3"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.icon", st, 30, vl); if (strcmp(st, "visible")) { get_state(PART:"elm.text", st, 30, vl); if (!strncmp(st, "visible", 7)) { set_state(PART:"elm.text", "visible_32", 0.0); } } } } program { name: "text_only_item_4"; signal: "elm,number,item,4"; source: "elm"; script { set_int(items_number, 4); } after: "text_only_item_upper_4"; } program { name: "text_only_item_5"; signal: "elm,number,item,5"; source: "elm"; script { set_int(items_number, 5); } after: "text_only_item_upper_4"; } program { name: "text_only_item_6"; signal: "elm,number,item,6"; source: "elm"; script { set_int(items_number, 6); } after: "text_only_item_upper_4"; } program { name: "text_only_item_7"; signal: "elm,number,item,7"; source: "elm"; script { set_int(items_number, 7); } after: "text_only_item_upper_4"; } program { name: "text_only_item_8"; signal: "elm,number,item,8"; source: "elm"; script { set_int(items_number, 8); } after: "text_only_item_upper_4"; } program { name: "text_only_item_9"; signal: "elm,number,item,9"; source: "elm"; script { set_int(items_number, 9); } after: "text_only_item_upper_4"; } program { name: "text_only_item_10"; signal: "elm,number,item,10"; source: "elm"; script { set_int(items_number, 10); } after: "text_only_item_upper_4"; } program { name: "text_only_item_upper_4"; signal: "elm,number,item,4"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.swallow.icon", st, 30, vl); if (strcmp(st, "visible")) { get_state(PART:"elm.text", st, 30, vl); if (!strncmp(st, "visible", 7)) { set_state(PART:"elm.text", "visible_30", 0.0); } } } } } } group { name: "elm/toolbar/item/item_horizontal"; inherit: "elm/toolbar/item/default"; 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 { min: 1 0; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "visible_30" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_30"; visible: 1; } description { state: "visible_32" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_32"; visible: 1; } description { state: "visible_36" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_36"; visible: 1; } } 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 { min: 1 0; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "visible_30" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_30"; visible: 1; } description { state: "visible_32" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_32"; visible: 1; } description { state: "visible_36" 0.0; inherit: "default" 0.0; text.style: "toolbar_text_style_36"; visible: 1; } } } } group { name: "elm/toolbar/separator/default"; parts { part { name: "divider"; type: RECT; scale: 1; description { state: "default" 0.0; min: 4 26; max: 4 9999; fixed: 1 1; rel1 { relative: 0.5 0.5; } rel2 { relative: 0.5 0.5; } } } part { name: "divider_left"; type: RECT; clip_to: "divider"; description { state: "default" 0.0; color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC; rel1 { relative: 0.0 0.0; to: "divider"; } rel2 { relative: 0.5 1.0; to: "divider"; } } } part { name: "divider_right"; type: RECT; clip_to: "divider"; description { state: "default" 0.0; color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC; rel1 { relative: 0.5 0.0; to: "divider"; } rel2 { relative: 1.0 1.0; to: "divider"; } } } } } 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_effect_tab_bounce_left.png" COMP; image: "00_effect_tab_bounce_right.png" COMP; } script { public left_timer, right_timer; public l_timer(val) { emit("do-hide-left-shadow", ""); set_int(left_timer, 0); return 0; } public r_timer(val) { emit("do-hide-right-shadow", ""); set_int(right_timer, 0); return 0; } } parts { part { name: "base"; type: RECT; scale: 1; description { state: "default" 0.0; color: 248 246 239 255; } } part { name: "left_padding"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 16 0; fixed: 1 1; visible: 0; align: 0.0 0.5; rel1.to: "base"; rel2.to: "base"; rel1.relative: 0.0 0.0; rel2.relative: 0.0 1.0; } } part { name: "right_padding"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: 16 0; fixed: 1 1; visible: 0; align: 1.0 0.5; rel1.to: "base"; rel2.to: "base"; rel1.relative: 1.0 0.0; rel2.relative: 1.0 1.0; } } part { name: "clipper"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1.to: "left_padding"; rel1.relative: 1.0 0.0; rel2.to: "right_padding"; rel2.relative: 0.0 1.0; } } part { name: "elm.swallow.content"; clip_to: "clipper"; type: SWALLOW; scale: 1; description { state: "default" 0.0; rel1.to: "clipper"; rel2.to: "clipper"; } } part { name: "left_shadow_clip"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; color: 255 255 255 0; } description { state: "show" 0.0; } } part { name: "right_shadow_clip"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; color: 255 255 255 0; } description { state: "show" 0.0; } } part { name: "shadow_left"; clip_to: "left_shadow_clip"; type: IMAGE; scale: 1; repeat_events: 1; description { state: "default" 0.0; min: 162 0; fixed: 1 1; align: 0.0 0.5; color: 255 255 255 255; rel1.relative: 0.0 0.0; rel2.relative: 0.0 1.0; image.normal: "00_effect_tab_bounce_left.png"; } } part { name: "shadow_right"; clip_to: "right_shadow_clip"; type: IMAGE; scale: 1; repeat_events: 1; description { state: "default" 0.0; min: 162 0; fixed: 1 1; align: 1.0 0.5; color: 255 255 255 255; rel1.relative: 1.0 0.0; rel2.relative: 1.0 1.0; image.normal: "00_effect_tab_bounce_right.png"; } } } programs { program { name: "load"; script { set_int(left_timer, 0); set_int(right_timer, 0); } } program { name: "left_shadow_show"; signal: "do-show-left-shadow"; source: ""; action: STATE_SET "show" 0.0; transition: LINEAR 0.3; target: "left_shadow_clip"; } program { name: "left_shadow_hide"; signal: "do-hide-left-shadow"; source: ""; action: STATE_SET "default" 0.0; transition: LINEAR 0.3; target: "left_shadow_clip"; } program { name: "right_shadow_show"; signal: "do-show-right-shadow"; source: ""; action: STATE_SET "show" 0.0; transition: LINEAR 0.3; target: "right_shadow_clip"; } program { name: "right_shadow_hide"; signal: "do-hide-right-shadow"; source: ""; action: STATE_SET "default" 0.0; transition: LINEAR 0.3; target: "right_shadow_clip"; } program { name: "edge_left"; signal: "elm,edge,left"; source: "elm"; script { new v; v = get_int(left_timer); if (!v) { emit("do-show-left-shadow", ""); } if (v > 0) cancel_timer(v); v = timer(0.5, "l_timer", 0); set_int(left_timer, v); } } program { name: "edge_right"; signal: "elm,edge,right"; source: "elm"; script { new v; v = get_int(right_timer); if (!v) { emit("do-show-right-shadow", ""); } if (v > 0) cancel_timer(v); v = timer(0.5, "r_timer", 0); set_int(right_timer, v); } } } } group { name: "elm/toolbar/item/tabbar"; images { image: "00_tab_press.png" COMP; image: "00_badge_bg.png" COMP; image: "00_focus.png" COMP; } data.item: "transition_animation_on" "1"; script { public item_state = ITEM_STATE_ENABLED; public items_number = 0; public selected = 0; public temp; } parts { part { name: "bg"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: 172 0; visible: 0; } description { state: "icon_text" 0.0; inherit: "default" 0.0; min: 229 0; } } part { name: "bg_cover"; type: IMAGE; scale: 1; mouse_events: 0; description { state: "default" 0.0; visible: 0; image.normal: "00_tab_press.png"; } description { state: "pressed" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "moving" 0.0; inherit: "default" 0.0; visible: 1; } } 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: 6 0; fixed: 1 1; visible: 0; 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: 6 0; fixed: 1 1; visible: 0; 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: 1 0; rel1 { relative: 1.0 1.0; to: "padding_left_top"; } rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: TABBAR_ITEM_SMALL_ICON_SIZE_INC; } 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: 1.0 0.0; to: "icon_rect"; } rel2.to: "icon_rect"; fixed: 1 0; min: 0 0; color: 0 0 0 0; } description { state: "visible" 0.0; inherit: "default" 0.0; min: 1 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: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; } fixed: 1 0; min: 8 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; min: TABBAR_ITEM_ICON_SIZE_INC; max: TABBAR_ITEM_ICON_SIZE_INC; rel1.to: "padding_left_top"; rel2.to: "padding_right_bottom"; aspect: 1.0 1.0; aspect_preference: HORIZONTAL; } description { state: "visible" 0.0; fixed: 1 0; min: TABBAR_ITEM_SMALL_ICON_SIZE_INC; max: TABBAR_ITEM_SMALL_ICON_SIZE_INC; 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: 1.0 1.0; aspect_preference: HORIZONTAL; } description { state: "icononly" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "elm.swallow.icon_new"; type: SWALLOW; scale: 1; clip_to: "elm.icon_new.clipper"; description { state: "default" 0.0; visible: 0; min: TABBAR_ITEM_ICON_SIZE_INC; max: TABBAR_ITEM_ICON_SIZE_INC; rel1.to: "padding_left_top"; rel2.to: "padding_right_bottom"; aspect: 1.0 1.0; aspect_preference: HORIZONTAL; } description { state: "visible" 0.0; fixed: 0 1; min: TABBAR_ITEM_SMALL_ICON_SIZE_INC; max: TABBAR_ITEM_SMALL_ICON_SIZE_INC; 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: 1.0 1.0; aspect_preference: HORIZONTAL; } description { state: "icononly" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "elm.swallow.icon_new.proxy"; type: PROXY; scale: 1; clip_to: "elm.icon_new.proxy.clipper"; description { state: "default" 0.0; source: "elm.swallow.icon_new"; rel1.to: "elm.swallow.icon_new"; rel1.offset: 0 -3; rel2.to: "elm.swallow.icon_new"; rel2.offset: -1 -4; } } part { name: "elm.swallow.icon.proxy"; type: PROXY; scale: 1; clip_to: "elm.icon.proxy.clipper"; description { state: "default" 0.0; source: "elm.swallow.icon"; rel1.to: "elm.swallow.icon"; rel1.offset: 0 -3; rel2.to: "elm.swallow.icon"; rel2.offset: -1 -4; } } 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_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } fixed: 1 1; max: 0 78; text { style: "toolbar_text_style_30"; min: 0 0; max: 1 0; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "visible" 0.24; inherit: "visible" 0.0; max: 0 62; text.style: "toolbar_text_style_24"; } description { state: "visible" 0.28; inherit: "visible" 0.0; max: 0 72; text.style: "toolbar_text_style_28"; } description { state: "visible" 0.30; inherit: "visible" 0.0; max: 0 78; text.style: "toolbar_text_style_30"; } description { state: "selected" 0.0; inherit: "visible" 0.0; text.style: "toolbar_selected_text_style_30"; } description { state: "selected" 0.24; inherit: "visible" 0.24; text.style: "toolbar_selected_text_style_24"; } description { state: "selected" 0.28; inherit: "visible" 0.28; text.style: "toolbar_selected_text_style_28"; } description { state: "selected" 0.30; inherit: "visible" 0.30; text.style: "toolbar_selected_text_style_30"; } } part { name: "elm.text_new"; type: TEXTBLOCK; mouse_events: 0; scale: 1; clip_to: "elm.text_new.clipper"; description { state: "default" 0.0; visible: 0; rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; } rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; } min: 0 36; max: 9999 36; fixed: 1 1; text { style: "toolbar_text_style_30"; min: 0 0; max: 0 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "visible" 0.24; inherit: "visible" 0.0; max: 0 62; text.style: "toolbar_text_style_24"; } description { state: "visible" 0.28; inherit: "visible" 0.0; max: 0 72; text.style: "toolbar_text_style_28"; } description { state: "visible" 0.30; inherit: "visible" 0.0; max: 0 78; text.style: "toolbar_text_style_30"; } description { state: "selected" 0.0; inherit: "visible" 0.0; text.style: "toolbar_selected_text_style_30"; } description { state: "selected" 0.24; inherit: "visible" 0.24; text.style: "toolbar_selected_text_style_24"; } description { state: "selected" 0.28; inherit: "visible" 0.28; text.style: "toolbar_selected_text_style_28"; } description { state: "selected" 0.30; inherit: "visible" 0.30; text.style: "toolbar_selected_text_style_30"; } } part { name: "padding.selected_line"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; rel1 { relative: 0.0 0.5; offset: 16 0; } rel2 { relative: 1.0 0.5; offset: -17 -1; } min: 0 64; fixed: 0 1; visible: 0; } } part { name: "selected_line"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; rel1 { to: "padding.selected_line"; relative: 0.0 1.0; } rel2 { to: "padding.selected_line"; relative: 1.0 1.0; } align: 0.5 0.0; color: 59 115 182 255; min: 0 5; fixed: 0 1; visible: 0; } description { state: "selected" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "padding.badge"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 0.5; rel1 { relative: 1.0 0.0; } rel2 { relative: 1.0 0.5; } min: 10 0; fixed: 1 0; visible: 0; } description { state: "default" 0.10; inherit: "default" 0.0; min: 10 0; } description { state: "default" 0.06; inherit: "default" 0.0; min: 6 0; } description { state: "default" 0.04; inherit: "default" 0.0; min: 4 0; } } part { name: "elm.image.badge"; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; min: 54 54; fixed: 1 1; rel1 { to: "left.padding.text"; relative: 0.0 0.0; } rel2 { to: "right.padding.text"; relative: 1.0 1.0; } image { normal: "00_badge_bg.png"; border: 29 24 0 0; border_scale: 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "left.padding.text"; type: RECT; scale: 1; description { state: "default" 0.0; visible: 0; fixed: 1 1; min: 13 54; rel1 { to: "elm.text.badge"; relative: 0.0 1.0; } rel2 { to: "elm.text.badge"; relative: 0.0 1.0; } align: 1.0 1.0; } } part { name: "right.padding.text"; type: RECT; scale: 1; description { state: "default" 0.0; visible: 0; fixed: 1 1; min: 8 54; rel1 { to: "padding.badge"; relative: 0.0 1.0; } rel2 { to: "padding.badge"; relative: 0.0 1.0; } align: 1.0 1.0; } } part { name: "elm.text.badge"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; rel1 { to: "right.padding.text"; relative: 0.0 0.0; } rel2 { to: "right.padding.text"; relative: 0.0 1.0; } min: 33 0; fixed: 1 0; align: 1.0 0.5; color: 10 100 208 255; text { font: "Tizen:style=Bold"; size: 26; min: 1 1; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; } } 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; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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; } description { state: "selected" 0.0; color: 255 255 255 255; } description { state: "disabled" 0.0; color: 255 255 255 153; } } 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; } description { state: "selected" 0.0; color: 255 255 255 255; } description { state: "disabled" 0.0; color: 255 255 255 153; } } part { name: "elm.icon.proxy.clipper"; type: RECT; description { state: "default" 0.0; color: 153 153 153 255; } description { state: "animation" 0.0; color: 255 255 255 0; } description { state: "selected" 0.0; color: 61 114 180 255; } description { state: "disabled" 0.0; color: 255 255 255 153; } } part { name: "elm.icon_new.proxy.clipper"; type: RECT; description { state: "default" 0.0; color: 255 255 255 0; } description { state: "animation" 0.0; color: 255 255 255 255; } description { state: "selected" 0.0; color: 61 114 180 255; } description { state: "disabled" 0.0; color: 255 255 255 153; } } part { name: "divider"; type: RECT; scale: 1; description { state: "default" 0.0; min: 4 26; max: 4 9999; fixed: 1 1; rel1 { relative: 1.0 0.5; to_y: "elm.swallow.icon"; } rel2 { relative: 1.0 0.5; to_y: "elm.swallow.icon"; } } description { state: "hidden" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "divider_left"; type: RECT; clip_to: "divider"; description { state: "default" 0.0; color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC; rel1 { relative: 0.0 0.0; to: "divider"; } rel2 { relative: 0.5 1.0; to: "divider"; } } } part { name: "divider_right"; type: RECT; clip_to: "divider"; description { state: "default" 0.0; color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC; rel1 { relative: 0.5 0.0; to: "divider"; } rel2 { relative: 1.0 1.0; to: "divider"; } } } part { name: "highlight"; type: IMAGE; description { state: "default" 0.0; visible: 0; image { normal: "00_focus.png"; border: 8 8 8 8; } } description { state: "highlighted" 0.0; inherit: "default" 0.0; visible: 1; } } part { name: "event"; type: RECT; mouse_events: 1; dragable { x: 1 0 0; y: 1 0 0; } 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: "elm.icon.proxy.clipper"; target: "selected_line"; after: "selected_text"; } program { name: "selected_text"; script{ new st[31]; new Float:vl; set_int(selected, 1); get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) set_state(PART:"elm.text", "selected", vl); } } program { name: "go_passive"; signal: "elm,state,unselected"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.icon.clipper"; target: "elm.icon.proxy.clipper"; target: "selected_line"; after: "unselected_text"; } program { name: "unselected_text"; script{ new st[31]; new Float:vl; set_int(selected, 0); get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "selected")) set_state(PART:"elm.text", "visible", vl); } } program { name: "moving"; signal: "elm,state,moving"; source: "elm"; action: STATE_SET "moving" 0.0; target: "bg_cover"; } program { name: "pressed"; signal: "mouse,down,1"; source: "event"; action: STATE_SET "pressed" 0.0; target: "bg_cover"; } program { name: "drag"; signal: "drag"; source: "event"; script { new st[31]; new Float:vl; new Float:dx, Float:dy; get_state(PART:"bg_cover", st, 30, vl); if (strcmp(st, "moving")) { get_drag(PART:"event", dx, dy); if ((abs(dx)*abs(dx))+(abs(dy)*abs(dy)) > 400) { set_drag(PART:"event", 0.0, 0.0); set_state(PART:"bg_cover", "default", 0.0); } set_drag(PART:"event", 0.0, 0.0); } } } program { name: "unpressed"; signal: "mouse,up,1"; source: "event"; script { set_drag(PART:"event", 0.0, 0.0); set_state(PART:"bg_cover", "default", 0.0); } } program { name: "go"; signal: "mouse,clicked,1"; source: "event"; action: SIGNAL_EMIT "elm,action,click" "elm"; after: "play_sound"; } program { name: "play_sound"; action: PLAY_SAMPLE "touch_sound" 1.0; } 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"; script { set_int(item_state, ITEM_STATE_DISABLED); set_state(PART:"bg", "disabled", 0.0); set_state(PART:"elm.text.clipper", "disabled", 0.0); set_state(PART:"elm.icon.clipper", "disabled", 0.0); set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0); run_program(PROGRAM:"label_set,animation,done"); run_program(PROGRAM:"icon_set,animation,done"); } } program { name: "enable"; signal: "elm,state,enabled"; source: "elm"; script { set_int(item_state, ITEM_STATE_ENABLED); set_state(PART:"bg", "default", 0.0); set_state(PART:"elm.text.clipper", "default", 0.0); set_state(PART:"elm.icon.clipper", "default", 0.0); set_state(PART:"elm.icon.proxy.clipper", "default", 0.0); run_program(PROGRAM:"label_set,animation,done"); run_program(PROGRAM:"icon_set,animation,done"); } } program { name: "label_set,animation,forward"; signal: "elm,state,label_set,forward"; source: "elm"; after: "label_set,sync"; } program { name: "label_set,animation,backward"; signal: "elm,state,label_set,backward"; source: "elm"; after: "label_set,sync"; } program { name: "label_set,sync"; signal: "elm,state,label_set"; source: "elm"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); set_state(PART:"elm.text_new", st, vl); } after: "label_set,animation"; } program { name: "label_set,animation"; 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"; script { set_state(PART:"elm.text_new.clipper", "default", 0.0); if (get_int(item_state) != ITEM_STATE_DISABLED) set_state(PART:"elm.text.clipper", "default", 0.0); else set_state(PART:"elm.text.clipper", "disabled", 0.0); } } 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"; target: "elm.icon.proxy.clipper"; target: "elm.icon_new.proxy.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"; script { set_state(PART:"elm.icon_new.clipper", "default", 0.0); if (get_int(item_state) != ITEM_STATE_DISABLED) { set_state(PART:"elm.icon.clipper", "default", 0.0); set_state(PART:"elm.icon.proxy.clipper", "default", 0.0); } else { set_state(PART:"elm.icon.clipper", "disabled", 0.0); set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0); } } } 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:"bg", "icon_text", 0.0); } get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "default")) { if (get_int(selected)) set_str(temp, "selected"); else set_str(temp, "visible"); get_str(temp, st, 31); if (get_int(items_number) <= 2) set_state(PART:"elm.text", st, 0.30); else if (get_int(items_number) == 3) set_state(PART:"elm.text", st, 0.28); else if (get_int(items_number) >= 4) { get_state(PART:"bg", st, 30, vl); if (!strcmp(st, "icon_text")) set_state(PART:"elm.text", st, 0.28); else set_state(PART:"elm.text", st, 0.24); } } } } 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); set_state(PART:"bg", "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 (!strncmp(st, "visible", 7)) { 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:"bg", "icon_text", 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); } } } program { name: "icon_hide"; signal: "elm,state,icon,hidden"; source: "elm"; script { set_state(PART:"elm.swallow.icon", "default", 0.0); set_state(PART:"icon_rect", "default", 0.0); set_state(PART:"padding_after_icon", "default", 0.0); set_state(PART:"bg", "default", 0.0); } } program { name: "text_only_item_1"; signal: "elm,number,item,1"; source: "elm"; script { set_int(items_number, 1); } after: "text_only_item_under_2"; } program { name: "text_only_item_2"; signal: "elm,number,item,2"; source: "elm"; script { set_int(items_number, 2); } after: "text_only_item_under_2"; } program { name: "text_only_item_under_2"; script { new st[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strncmp(st, "visible", 7)) { set_state(PART:"elm.text", st, 0.30); } set_state(PART:"padding.badge", "default", 0.10); } } program { name: "text_only_item_3"; signal: "elm,number,item,3"; source: "elm"; script { new st[31]; new Float:vl; set_int(items_number, 3); get_state(PART:"elm.text", st, 30, vl); if (!strncmp(st, "visible", 7)) { set_state(PART:"elm.text", st, 0.28); } set_state(PART:"padding.badge", "default", 0.06); } } program { name: "text_only_item_4"; signal: "elm,number,item,4"; source: "elm"; script { set_int(items_number, 4); } after: "text_only_item_upper_4"; } program { name: "text_only_item_5"; signal: "elm,number,item,5"; source: "elm"; script { set_int(items_number, 5); } after: "text_only_item_upper_4"; } program { name: "text_only_item_6"; signal: "elm,number,item,6"; source: "elm"; script { set_int(items_number, 6); } after: "text_only_item_upper_4"; } program { name: "text_only_item_7"; signal: "elm,number,item,7"; source: "elm"; script { set_int(items_number, 7); } after: "text_only_item_upper_4"; } program { name: "text_only_item_8"; signal: "elm,number,item,8"; source: "elm"; script { set_int(items_number, 8); } after: "text_only_item_upper_4"; } program { name: "text_only_item_9"; signal: "elm,number,item,9"; source: "elm"; script { set_int(items_number, 9); } after: "text_only_item_upper_4"; } program { name: "text_only_item_10"; signal: "elm,number,item,10"; source: "elm"; script { set_int(items_number, 10); } after: "text_only_item_upper_4"; } program { name: "text_only_item_upper_4"; script { new st[31]; new stb[31]; new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible") || !strcmp(st, "selected")) { get_state(PART:"bg", stb, 30, vl); if (!strcmp(stb, "icon_text")) set_state(PART:"elm.text", st, 0.28); else set_state(PART:"elm.text", st, 0.24); } get_state(PART:"bg", stb, 30, vl); if (!strcmp(stb, "icon_text")) set_state(PART:"padding.badge", "default", 0.06); else set_state(PART:"padding.badge", "default", 0.04); } } program { name: "badge_show"; signal: "elm,state,elm.text.badge,visible"; source: "elm"; action: STATE_SET "visible" 0.0; target: "elm.text.badge"; target: "elm.image.badge"; } program { name: "badge_hide"; signal: "elm,state,elm.text.badge,hidden"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.text.badge"; target: "elm.image.badge"; } program { name: "divider_visible"; signal: "elm,order,first,item"; signal: "elm,order,default,item"; source: "elm"; action: STATE_SET "default" 0.0; target: "divider"; } program { name: "divider_hidden"; signal: "elm,order,last,item"; source: "elm"; action: STATE_SET "hidden" 0.0; target: "divider"; } program { name: "highlight_on"; signal: "elm,highlight,on"; source: "elm"; action: STATE_SET "highlighted" 0.0; target: "highlight"; } program { name: "highlight_off"; signal: "elm,highlight,off"; source: "elm"; action: STATE_SET "default" 0.0; target: "highlight"; } } } group { name: "elm/toolbar/base/tabbar/item_horizontal"; inherit: "elm/toolbar/base/tabbar"; parts { part { name: "left_padding"; description { state: "default" 0.0; min: 34 0; } } part { name: "right_padding"; description { state: "default" 0.0; min: 34 0; } } } } group { name: "elm/toolbar/item/tabbar/item_horizontal"; inherit: "elm/toolbar/item/tabbar"; parts { part { name: "bg"; description { state: "default" 0.0; min: 303 0; } description { state: "icon_text" 0.0; min: 404 0; } } } }