[button] add controlbar/horizontal_* style
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Thu, 26 May 2011 06:15:37 +0000 (15:15 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Thu, 26 May 2011 06:15:37 +0000 (15:15 +0900)
themes/groups/button.edc

index 35d5f39..66cc1ac 100644 (file)
@@ -10265,6 +10265,1158 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
    }
 
 ///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/controlbar/horizontal_center";
+   script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            type: RECT;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 50;
+               rel1.offset: 5 5;
+               rel2.offset: -6 -6;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "clicked" 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;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 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;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 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: "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;
+               visible: 1;
+               min: 44 44;
+               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: "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 0 0 0;
+            }
+            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_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 6 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "disabler";
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               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"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 44 44;
+               max: 44 44;
+               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: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 44 44;
+               max: 44 44;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_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;
+            clip_to: "disabler";
+            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"; }
+               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;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               color2: 0 0 0 102;
+            }
+            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: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               color: 255 255 255 127;
+            }
+         }
+      }
+      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) != BUTTON_STATE_DISABLED)
+                  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: "over2";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_DISABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "over2";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_ENABLED);
+               set_state(PART:"elm.text", "visible", 0.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/controlbar/horizontal_left";
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            type: IMAGE;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 50;
+               rel1.offset: 5 5;
+               rel2.offset: -6 -6;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "clicked" 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;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 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;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 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: "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;
+               visible: 1;
+               min: 44 44;
+               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: "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 0 0 0;
+            }
+            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_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 6 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "disabler";
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               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"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 44 44;
+               max: 44 44;
+               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: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 44 44;
+               max: 44 44;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_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;
+            clip_to: "disabler";
+            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"; }
+               align: 0.0 0.5;
+               color: 255 255 255 255;
+               text {
+                  font: "SLP:style=Medium";
+                  size: 20;
+                  min:  0 0;
+                  align: 0.0 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               color2: 0 0 0 102;
+            }
+            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: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               color: 255 255 255 127;
+            }
+         }
+      }
+      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) != BUTTON_STATE_DISABLED)
+                  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: "over2";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_DISABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "over2";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_ENABLED);
+               set_state(PART:"elm.text", "visible", 0.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/controlbar/horizontal_right";
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            type: IMAGE;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 50;
+               rel1.offset: 5 5;
+               rel2.offset: -6 -6;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "clicked" 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;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 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;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 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: "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;
+               visible: 1;
+               min: 44 44;
+               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: "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 0 0 0;
+            }
+            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_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 6 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "disabler";
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               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"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 44 44;
+               max: 44 44;
+               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: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 44 44;
+               max: 44 44;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_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;
+            clip_to: "disabler";
+            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"; }
+               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;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               color2: 0 0 0 102;
+            }
+            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: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               color: 255 255 255 127;
+            }
+         }
+      }
+      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) != BUTTON_STATE_DISABLED)
+                  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: "over2";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_DISABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "over2";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_ENABLED);
+               set_state(PART:"elm.text", "visible", 0.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/tickernoti";
       images {
          image: "00_button_06_normal.png" COMP;