From: Jaehwan Kim Date: Tue, 22 Feb 2011 08:00:18 +0000 (+0900) Subject: [button] add style navigationbar_control X-Git-Tag: submit/2.0alpha-wayland/20121130.000903~957^2~4^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d6402dc08b5da0112d033e86c6d3db87e1739eb;p=profile%2Fivi%2Fefl-theme-tizen.git [button] add style navigationbar_control Change-Id: I077096e14a46aaf42b4cbf89fda22c3d60b8b144 --- diff --git a/themes/groups/button.edc b/themes/groups/button.edc index e5aea8a..ac8713d 100644 --- a/themes/groups/button.edc +++ b/themes/groups/button.edc @@ -14785,3 +14785,1262 @@ } } } + +/////////////////////////////////////////////////////////////////////////////////////// + group { name: "elm/button/base/navigationbar_control/center"; + script { + public button_state = 0; //0:enabled, 1: disabled + } + parts { + part { name: "button_image"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + min: 20 60; + color: 0 0 0 0; + rel1.offset: 5 5; + rel2.offset: -6 -6; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + color: 187 127 16 255; + } + } + part { + name: "padding_left"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 0.0 1.0; + min: 10 5; + fixed: 1 0; + color: 0 0 0 0; + } + } + part { + name: "padding_right"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 0.0; + rel1.relative: 1.0 0.0; + rel2.relative: 1.0 1.0; + min: 10 5; + fixed: 1 0; + color: 0 0 0 0; + } + } + part { + name: "padding_top"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 0.0; + min: 5 5; + fixed: 0 1; + color: 0 0 0 0; + } + } + part { + name: "padding_bottom"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 0.0 1.0; + rel2.relative: 1.0 1.0; + min: 5 5; + fixed: 0 1; + color: 0 0 0 0; + } + } + part { + name: "icon_rect"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + min: 0 0; + fixed: 1 0; + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + align: 0.0 0.5; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + visible: 1; + min: 22 22; + fixed: 1 0; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + align: 0.0 0.5; + 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: 1.0 0.0; to: "icon_rect"; } + rel2 { relative: 1.0 1.0; to: "icon_rect"; } + fixed: 1 0; + min: 0 0; + color: 0 255 0 100; + } + description { state: "visible" 0.0; + visible: 1; + align: 0.0 0.0; + rel1 { relative: 1.0 0.0; to: "icon_rect"; } + rel2 { relative: 1.0 1.0; to: "icon_rect"; } + fixed: 1 0; + min: 6 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: 1.0 0.5; + rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_bottom"; } + fixed: 1 0; + min: 6 0; + color: 0 0 0 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + visible: 1; + min: 22 22; + max: 22 22; + align: 1.0 0.5; + rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_bottom"; } + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0;; + visible: 1; + min: 30 30; + max: 30 30; + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } + align: 0.5 0.5; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.text"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } + align: 0.5 0.5; + color: 255 255 255 255; + text { + font: "SLP:style=Medium"; + size: 20; + min: 0 0; + align: 0.5 0.5; + max: 1 0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 90 24; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 0 0; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + } + description { state: "disabled_visible" 0.0; + inherit: "default" 0.0; + color: BUTTON_ICON_TEXT_DISABLED_COLOR_INC; + color3: 0 0 0 0; + visible: 1; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 0 0; + color: BUTTON_ICON_TEXT_FOCUSED_COLOR_INC; + } + } + part { name: "over2"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "over3"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "disabler"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { name: "button_click"; + signal: "mouse,down,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "button_click_anim"; + action: STATE_SET "clicked" 0.0; + target: "button_image"; + after: "text_clicked"; + } + program { name: "text_clicked"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.text", "clicked", 0.0); + } + } + program { name: "button_unpress"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + } + program { name: "button_mouseout_clicked"; + signal: "mouse,up,1"; + source: "over3"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (strcmp(st, "icononly")) + { + emit("elm,action,default,text,set", ""); + set_state(PART:"elm.text", "visible", 0.0); + } + if(get_int(button_state) !=1) + set_state(PART:"button_image", "default", 0.0); + } + after: button_unpress; + } + program { name: "button_click2"; + signal: "mouse,down,1"; + source: "over3"; + action: STATE_SET "clicked" 0.0; + target: "over3"; + } + program { name: "button_unclick2"; + signal: "mouse,clicked,1"; + source: "over3"; + action: STATE_SET "default" 0.0; + target: "over3"; + } + program { name: "button_unclick3"; + signal: "mouse,clicked,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "icononly")) + { + set_state(PART:"elm.swallow.content", "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.content", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.content", "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.content", "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.content", "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"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "button_image"; + target: "over2"; + target: "disabler"; + 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); + else + set_state(PART:"elm.text", "disabled", 0.0); + set_int(button_state, 1); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "button_image"; + target: "over2"; + target: "disabler"; + 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); + else + set_state(PART:"elm.text", "default", 0.0); + set_int(button_state, 0); + } + } + program { name: "focused"; + action: STATE_SET "focused" 0.0; + target: "button_image"; + target: "elm.text"; + } + program { name: "unfocused"; + action: STATE_SET "default" 0.0; + target: "button_image"; + after: "unfocus_text"; + } + program { name: "unfocus_text"; + action: STATE_SET "visible" 0.0; + target: "elm.text"; + } + } + } + +/////////////////////////////////////////////////////////////////////////////////////// + group { name: "elm/button/base/navigationbar_control/left"; + script { + public button_state = 0; //0:enabled, 1: disabled + } + parts { + part { name: "button_image"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + min: 20 60; + color: 0 0 0 0; + rel1.offset: 5 5; + rel2.offset: -6 -6; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + color: 187 127 16 255; + } + } + part { + name: "padding_left"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 0.0 1.0; + min: 10 5; + fixed: 1 0; + color: 0 0 0 0; + } + } + part { + name: "padding_right"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 0.0; + rel1.relative: 1.0 0.0; + rel2.relative: 1.0 1.0; + min: 10 5; + fixed: 1 0; + color: 0 0 0 0; + } + } + part { + name: "padding_top"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 0.0; + min: 5 5; + fixed: 0 1; + color: 0 0 0 0; + } + } + part { + name: "padding_bottom"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 0.0 1.0; + rel2.relative: 1.0 1.0; + min: 5 5; + fixed: 0 1; + color: 0 0 0 0; + } + } + part { + name: "icon_rect"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + min: 0 40; + fixed: 1 0; + rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; } + align: 0.0 0.5; + color: 0 0 0 0; + } + } + part { + name: "padding_icon_text"; + 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 { relative: 1.0 1.0; to: "icon_rect"; } + fixed: 1 0; + min: 0 0; + color: 0 0 0 0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } + description { state: "visible" 0.0; //when icon is visible + align: 0.0 0.0; + rel1 { relative: 1.0 0.0; to: "icon_rect"; } + rel2 { relative: 1.0 1.0; to: "icon_rect"; } + fixed: 1 0; + min: 6 0; + color: 0 0 0 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + visible: 1; + min: 22 22; + max: 22 22; + align: 0.0 0.5; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0;; + visible: 1; + min: 30 30; + max: 30 30; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } + align: 0.5 0.5; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.text"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } + align: 0.0 0.5; + color: 255 255 255 255; + text { + font: "SLP:style=Medium"; + size: 20; + min: 0 0; + align: 0.5 0.5; + max: 1 0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 90 40; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 0 0; + color: 255 255 255 255; + color2: 0 0 0 102; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + } + description { state: "disabled_visible" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + visible: 1; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 0 0; + color: 255 255 255 255; + color2: 0 0 0 102; + } + } + part { name: "over2"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "over3"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "disabler"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { name: "button_click"; + signal: "mouse,down,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "button_click_anim"; + action: STATE_SET "clicked" 0.0; + target: "button_image"; + after: "text_clicked"; + } + program { name: "text_clicked"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.text", "clicked", 0.0); + } + } + program { name: "button_unpress"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + } + program { name: "button_mouseout_clicked"; + signal: "mouse,up,1"; + source: "over3"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (strcmp(st, "icononly")) + { + emit("elm,action,default,text,set", ""); + set_state(PART:"elm.text", "visible", 0.0); + } + if(get_int(button_state) !=1) + set_state(PART:"button_image", "default", 0.0); + } + after: button_unpress; + } + program { name: "button_click2"; + signal: "mouse,down,1"; + source: "over3"; + action: STATE_SET "clicked" 0.0; + target: "over3"; + } + program { name: "button_unclick2"; + signal: "mouse,clicked,1"; + source: "over3"; + action: STATE_SET "default" 0.0; + target: "over3"; + } + program { name: "button_unclick3"; + signal: "mouse,clicked,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "icononly")) + { + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"padding_icon_text", "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.content", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"padding_icon_text", "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.content", "visible", 0.0); + set_state(PART:"padding_icon_text", "visible", 0.0); + } + else + { + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"padding_icon_text", "icononly", 0.0); + } + } + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "button_image"; + target: "over2"; + target: "disabler"; + 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); + else + set_state(PART:"elm.text", "disabled", 0.0); + set_int(button_state, 1); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "button_image"; + target: "over2"; + target: "disabler"; + 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); + else + set_state(PART:"elm.text", "default", 0.0); + set_int(button_state, 0); + } + } + program { name: "focused"; + //signal: "elm,action,focus"; + //source: "elm"; + action: STATE_SET "focused" 0.0; + target: "button_image"; + target: "elm.text"; + } + program { name: "unfocused"; + //signal: "elm,action,unfocus"; + //source: "elm"; + action: STATE_SET "default" 0.0; + target: "button_image"; + after: "unfocus_text"; + } + program { name: "unfocus_text"; + action: STATE_SET "visible" 0.0; + target: "elm.text"; + } + } + } + +/////////////////////////////////////////////////////////////////////////////////////// + group { name: "elm/button/base/navigationbar_control/right"; + script { + public button_state = 0; //0:enabled, 1: disabled + } + parts { + part { name: "button_image"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + min: 20 60; + color: 0 0 0 0; + rel1.offset: 5 5; + rel2.offset: -6 -6; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + color: 187 127 16 255; + } + } + part { + name: "padding_left"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 0.0 1.0; + min: 10 5; + fixed: 1 0; + color: 0 0 0 0; + } + } + part { + name: "padding_right"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 0.0; + rel1.relative: 1.0 0.0; + rel2.relative: 1.0 1.0; + min: 10 5; + fixed: 1 0; + color: 0 0 0 0; + } + } + part { + name: "padding_top"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 0.0; + min: 5 5; + fixed: 0 1; + color: 0 0 0 0; + } + } + part { + name: "padding_bottom"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 0.0 1.0; + rel2.relative: 1.0 1.0; + min: 5 5; + fixed: 0 1; + color: 0 0 0 0; + } + } + part { + name: "icon_rect"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + visible: 1; + min: 0 40; + fixed: 1 0; + rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; } + align: 0.0 0.5; + color: 0 0 0 0; + } + } + part { + name: "padding_icon_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 0.0; to: "elm.text"; } + rel2 { relative: 0.0 1.0; to: "elm.text"; } + fixed: 1 0; + min: 0 0; + color: 0 0 0 0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } + description { state: "visible" 0.0; //when icon is visible + align: 1.0 0.5; + rel1 { relative: 0.0 0.0; to: "elm.text"; } + rel2 { relative: 0.0 1.0; to: "elm.text"; } + fixed: 1 0; + min: 6 0; + color: 0 0 0 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 0; + visible: 1; + min: 22 22; + max: 22 22; + align: 1.0 0.5; + rel1 {relative: 0.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; } + rel2 {relative: 0.0 0.0; to_x: "padding_icon_text"; to_y: "padding_bottom"; } + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + description { state: "icononly" 0.0;; + visible: 1; + min: 30 30; + max: 30 30; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } + align: 0.5 0.5; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.text"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + rel1 { relative: 0.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } + align: 1.0 0.5; + color: 255 255 255 255; + text { + font: "SLP:style=Medium"; + size: 20; + min: 0 0; + align: 1.0 0.5; + max: 1 0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 90 40; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 0 0; + color: 255 255 255 255; + color2: 0 0 0 102; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + } + description { state: "disabled_visible" 0.0; + inherit: "default" 0.0; + color: 0 0 0 128; + color3: 0 0 0 0; + visible: 1; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + min: 0 0; + color: 255 255 255 255; + color2: 0 0 0 102; + } + } + part { name: "over2"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "over3"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "disabler"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { name: "button_click"; + signal: "mouse,down,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_click_anim"; + } + program { name: "button_click_anim"; + action: STATE_SET "clicked" 0.0; + target: "button_image"; + after: "text_clicked"; + } + program { name: "text_clicked"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.text", "clicked", 0.0); + } + } + program { name: "button_unpress"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + } + program { name: "button_mouseout_clicked"; + signal: "mouse,up,1"; + source: "over3"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (strcmp(st, "icononly")) + { + emit("elm,action,default,text,set", ""); + set_state(PART:"elm.text", "visible", 0.0); + } + if(get_int(button_state) !=1) + set_state(PART:"button_image", "default", 0.0); + } + after: button_unpress; + } + program { name: "button_click2"; + signal: "mouse,down,1"; + source: "over3"; + action: STATE_SET "clicked" 0.0; + target: "over3"; + } + program { name: "button_unclick2"; + signal: "mouse,clicked,1"; + source: "over3"; + action: STATE_SET "default" 0.0; + target: "over3"; + } + program { name: "button_unclick3"; + signal: "mouse,clicked,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "icononly")) + { + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"padding_icon_text", "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.content", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"padding_icon_text", "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.content", "visible", 0.0); + set_state(PART:"padding_icon_text", "visible", 0.0); + } + else + { + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"padding_icon_text", "icononly", 0.0); + } + } + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "button_image"; + target: "over2"; + target: "disabler"; + 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); + else + set_state(PART:"elm.text", "disabled", 0.0); + set_int(button_state, 1); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "button_image"; + target: "over2"; + target: "disabler"; + 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); + else + set_state(PART:"elm.text", "default", 0.0); + set_int(button_state, 0); + } + } + program { name: "focused"; + //signal: "elm,action,focus"; + //source: "elm"; + action: STATE_SET "focused" 0.0; + target: "button_image"; + target: "elm.text"; + } + program { name: "unfocused"; + //signal: "elm,action,unfocus"; + //source: "elm"; + action: STATE_SET "default" 0.0; + target: "button_image"; + after: "unfocus_text"; + } + program { name: "unfocus_text"; + action: STATE_SET "visible" 0.0; + target: "elm.text"; + } + } + } + diff --git a/themes/groups/controlbar.edc b/themes/groups/controlbar.edc index ea3c3d0..3b97a33 100644 --- a/themes/groups/controlbar.edc +++ b/themes/groups/controlbar.edc @@ -823,6 +823,190 @@ } } + + group{ + name: "elm/controlbar/base/navigationbar"; + + parts{ + part{ + name: "bg_rect"; + type: RECT; + scale: 1; + mouse_events:0; + description{ + state: "default" 0.0; + rel1 {relative: 0.0 0.0; offset: 0 0;} + rel2 {relative: 1.0 1.0; offset: -1 -1;} + color: 0 0 0 0; + } + } + part{ + name: "bg_image"; + type: SWALLOW; + scale: 1; + mouse_events:0; + description{ + state: "default" 0.0; + rel1 {relative: 0.0 0.0; offset: 0 0;} + rel2 {relative: 1.0 1.0; offset: -1 -1;} + } + description{ + state: "large" 0.0; + min: 0 TAB_BAR_H; + fixed: 0 1; + align: 0.5 1.0; + rel1 {relative: 0.0 1.0; offset: 0 -1;} + rel2 {relative: 1.0 1.0; offset: -1 -1;} + } + description{ + state: "small" 0.0; + min: 0 TOOL_BAR_H; + fixed: 0 1; + align: 0.5 1.0; + rel1 {relative: 0.0 1.0; offset: 0 -1;} + rel2 {relative: 1.0 1.0; offset: -1 -1;} + } + description{ + state: "left" 0.0; + min: TAB_BAR_H 0; + fixed: 1 0; + align: 0.0 0.5; + rel1 {relative: 0.0 0.0; offset: 0 0;} + rel2 {relative: 0.0 1.0; offset: 0 -1;} + } + description{ + state: "right" 0.0; + min: TAB_BAR_H 0; + fixed: 1 0; + align: 1.0 0.5; + rel1 {relative: 1.0 0.0; offset: -1 0;} + rel2 {relative: 1.0 1.0; offset: -1 -1;} + } + } + part{ + name: "elm.swallow.items"; + type: SWALLOW; + scale: 1; + description{ + state: "default" 0.0; + rel1 {relative: 0.0 0.0; offset: 5 0; to: "bg_image";} + rel2 {relative: 1.0 1.0; offset: -6 -1; to: "bg_image";} + } + } + } + programs{ + program{ + name: "default"; + signal: "elm,state,default"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg_image"; + } + program{ + name: "large"; + signal: "elm,state,large"; + source: "elm"; + action: STATE_SET "large" 0.0; + target: "bg_image"; + } + program{ + name: "small"; + signal: "elm,state,small"; + source: "elm"; + action: STATE_SET "small" 0.0; + target: "bg_image"; + } + program{ + name: "left"; + signal: "elm,state,left"; + source: "elm"; + action: STATE_SET "left" 0.0; + target: "bg_image"; + } + program{ + name: "right"; + signal: "elm,state,right"; + source: "elm"; + action: STATE_SET "right" 0.0; + target: "bg_image"; + } + } + } + + group{ + name: "elm/controlbar/background/navigationbar"; + + images{ + image: "00_winset_control_top_bg.png" COMP; + image: "00_winset_control_tabbar_bg.png" COMP; + image: "00_winset_control_tabbar_left_bg.png" COMP; + image: "00_winset_control_tabbar_right_bg.png" COMP; + } + + parts{ + part{ + name: "bg_image"; + type: IMAGE; + scale: 1; + mouse_events:0; + description{ + state: "default" 0.0; + rel1 {relative: 0.0 0.0; offset: 0 0;} + rel2 {relative: 1.0 1.0; offset: -1 -1;} + image.normal: "00_winset_control_top_bg.png"; + image.border: 1 1 2 6; + color: 255 255 255 255; + } + description{ + state: "tabbar" 0.0; + inherit: "default" 0.0; + image.normal: "00_winset_control_tabbar_bg.png"; + } + description{ + state: "tabbar_left" 0.0; + inherit: "default" 0.0; + image.normal: "00_winset_control_tabbar_left_bg.png"; + } + description{ + state: "tabbar_right" 0.0; + inherit: "default" 0.0; + image.normal: "00_winset_control_tabbar_right_bg.png"; + } + } + } + programs { + program { + name: "tabbar_bg"; + signal: "elm,state,tabbar"; + source: "elm"; + action: STATE_SET "tabbar" 0.0; + target: "bg_image"; + } + program { + name: "toolbar_bg"; + signal: "elm,state,toolbar"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg_image"; + } + program { + name: "tabbar_left_bg"; + signal: "elm,state,tabbar_left"; + source: "elm"; + action: STATE_SET "tabbar_left" 0.0; + target: "bg_image"; + } + program { + name: "tabbar_right_bg"; + signal: "elm,state,tabbar_right"; + source: "elm"; + action: STATE_SET "tabbar_right" 0.0; + target: "bg_image"; + } + } + } + + styles { style { name: "controlbar_textblock_style"; diff --git a/themes/images/nbeat-black/00_winset_control_top_bg.png b/themes/images/nbeat-black/00_winset_control_top_bg.png index a5d8d2c..523ca78 100755 Binary files a/themes/images/nbeat-black/00_winset_control_top_bg.png and b/themes/images/nbeat-black/00_winset_control_top_bg.png differ diff --git a/themes/images/nbeat-blue/00_winset_control_top_bg.png b/themes/images/nbeat-blue/00_winset_control_top_bg.png index a5d8d2c..523ca78 100755 Binary files a/themes/images/nbeat-blue/00_winset_control_top_bg.png and b/themes/images/nbeat-blue/00_winset_control_top_bg.png differ diff --git a/themes/images/nbeat-green/00_winset_control_top_bg.png b/themes/images/nbeat-green/00_winset_control_top_bg.png index a5d8d2c..523ca78 100755 Binary files a/themes/images/nbeat-green/00_winset_control_top_bg.png and b/themes/images/nbeat-green/00_winset_control_top_bg.png differ diff --git a/themes/images/nbeat-purple/00_winset_control_top_bg.png b/themes/images/nbeat-purple/00_winset_control_top_bg.png index a5d8d2c..523ca78 100755 Binary files a/themes/images/nbeat-purple/00_winset_control_top_bg.png and b/themes/images/nbeat-purple/00_winset_control_top_bg.png differ diff --git a/themes/images/nbeat/00_winset_control_top_bg.png b/themes/images/nbeat/00_winset_control_top_bg.png index a5d8d2c..523ca78 100755 Binary files a/themes/images/nbeat/00_winset_control_top_bg.png and b/themes/images/nbeat/00_winset_control_top_bg.png differ