[Corrected Indentation and code cleanup in button.edc for popup button,circle button...
authorRajeev Ranjan <rajeev.r@samsung.com>
Tue, 4 Oct 2011 11:22:09 +0000 (16:52 +0530)
committerRajeev Ranjan <rajeev.r@samsung.com>
Tue, 11 Oct 2011 05:56:57 +0000 (11:26 +0530)
Change-Id: I96e3bca1b8828c09d88cfdf86c8e898c356adcaa

themes/groups/button.edc

index 305b8ae..597e1a1 100644 (file)
             }
             description { state: "disabled" 0.0;
                inherit: "default" 0.0;
-               image.normal: "00_button_popup_dim.png";
+               image {
+                  normal: "00_button_popup_dim.png";
+               }
             }
             description { state: "focused" 0.0;
                inherit: "default" 0.0;
-               image.normal: "00_button_popup_focus.png";
+               image {
+                  normal: "00_button_popup_focus.png";
+               }
             }
          }
          part { name: "padding_left_top";
                aspect_preference: VERTICAL;
             }
             description { state: "icononly" 0.0;
-               visible: 1;
                min: BUTTON_POPUP_ICON_ICONONLY_MIN_INC;
                rel1 {
                   relative: 1.0 1.0;
       } \
       parts { \
          part { name: "button_image"; \
-            mouse_events: 1; \
             scale: 1; \
             description { state: "default" 0.0; \
                min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \
             description { \
                state: "clicked" 0.0; \
                inherit: "default" 0.0; \
-               image.normal: "00_btn_circle_bg_press.png"; \
+               image { \
+                  normal: "00_btn_circle_bg_press.png"; \
+               } \
             } \
             description { \
                state: "disabled" 0.0; \
             } \
          } \
          part { name: "button_center_part"; \
-            mouse_events: 1; \
             scale: 1; \
             description { state: "default" 0.0; \
                min: BUTTON_CIRCLE_STYLE_IMAGE_MIN_MAX_INC; \
                max: BUTTON_CIRCLE_STYLE_IMAGE_MIN_MAX_INC; \
-               image.normal: image_normal; \
+               image { \
+                  normal: image_normal; \
+               } \
                color: 255 255 255 255; \
             } \
             description { \
                state: "clicked" 0.0; \
                inherit: "default" 0.0; \
-               image.normal: image_press; \
+               image { \
+                  normal: image_press; \
+               } \
             } \
             description { \
                state: "disabled" 0.0; \
          } \
          part { name: "over1"; \
             type: RECT; \
-            mouse_events: 1; \
             ignore_flags: ON_HOLD; \
             description { state: "default" 0.0; \
                color: 0 0 0 0; \
             } \
          } \
          part { name: "over2"; \
-            mouse_events: 1; \
             repeat_events: 1; \
             description { state: "default" 0.0; \
                color: 0 0 0 0; \
       } \
       parts { \
          part { name: "button_image"; \
-            mouse_events: 1; \
             scale: 1; \
             description { state: "default" 0.0; \
                min: BUTTON_EDIT_STYLE_BG_NORMAL_MIN_MAX_INC; \
             description { \
                state: "clicked" 0.0; \
                inherit: "default" 0.0; \
-               image.normal: "00_button_edit_press.png"; \
+               image { \
+                  normal: "00_button_edit_press.png"; \
+               } \
             } \
             description { \
                state: "disabled" 0.0; \
                inherit: "default" 0.0; \
-               image.normal: "00_button_edit_dim.png"; \
+               image { \
+                  normal: "00_button_edit_dim.png"; \
+               } \
             } \
          } \
          part { name: "button_center_part"; \
             description { \
                state: "clicked" 0.0; \
                inherit: "default" 0.0; \
-               image.normal: image_press; \
+               image { \
+                  normal: image_press; \
+               } \
             } \
          } \
          part { name: "over1"; \
             type: RECT; \
-            mouse_events: 1; \
             repeat_events: 1; \
             ignore_flags: ON_HOLD; \
             description { state: "default" 0.0; \
             } \
          } \
          part { name: "over2"; \
-            mouse_events: 1; \
             repeat_events: 1; \
             description { state: "default" 0.0; \
                color: 0 0 0 0; \
       } \
    }
 ///////////////////////////////////////////////////////////////////////////////////////
-BUTTON_EDIT_STYLES("icon_plus", "00_button_icon_plus.png", "00_button_icon_plus_press.png", 46, 46)
+   BUTTON_EDIT_STYLES("icon_plus", "00_button_icon_plus.png", "00_button_icon_plus_press.png", 46, 46)
 
 ///////////////////////////////////////////////////////////////////////////////////////
-BUTTON_EDIT_STYLES("icon_plus/extended", "00_button_icon_plus.png", "00_button_icon_plus_press.png", 60, 75)
+   BUTTON_EDIT_STYLES("icon_plus/extended", "00_button_icon_plus.png", "00_button_icon_plus_press.png", 60, 75)
 
 ///////////////////////////////////////////////////////////////////////////////////////
-BUTTON_EDIT_STYLES("icon_minus", "00_button_icon_minus.png", "00_button_icon_minus_press.png", 46, 46)
+   BUTTON_EDIT_STYLES("icon_minus", "00_button_icon_minus.png", "00_button_icon_minus_press.png", 46, 46)
 
 ///////////////////////////////////////////////////////////////////////////////////////
-BUTTON_EDIT_STYLES("icon_minus/extended", "00_button_icon_minus.png", "00_button_icon_minus_press.png", 60, 75)
+   BUTTON_EDIT_STYLES("icon_minus/extended", "00_button_icon_minus.png", "00_button_icon_minus_press.png", 60, 75)
 
 ///////////////////////////////////////////////////////////////////////////////////////
-BUTTON_EDIT_STYLES("icon_expand", "00_button_icon_expand.png", "00_button_icon_expand_press.png", 46, 46)
+   BUTTON_EDIT_STYLES("icon_expand", "00_button_icon_expand.png", "00_button_icon_expand_press.png", 46, 46)
 
 ///////////////////////////////////////////////////////////////////////////////////////
-BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_button_icon_expand_press.png", 60, 75)
+   BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_button_icon_expand_press.png", 60, 75)
 
 ///////////////////////////////////////////////////////////////////////////////////////
    group { name: "elm/button/base/contacts/delete";
@@ -2584,7 +2592,6 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
       }
       parts {
          part { name: "button_image";
-            mouse_events: 1;
             scale: 1;
             description { state: "default" 0.0;
                min: BUTTON_CONTACT_DELETE_BG_NORMAL_MIN_INC;
@@ -2596,54 +2603,64 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             }
             description { state: "clicked" 0.0;
                inherit: "default" 0.0;
-               image.normal: "00_button_edit_press.png";
+               image {
+                  normal: "00_button_edit_press.png";
+               }
             }
             description { state: "disabled" 0.0;
                inherit: "default" 0.0;
-               image.normal: "00_button_edit_dim.png";
+               image {
+                  normal: "00_button_edit_dim.png";
+               }
             }
             description { state: "focused" 0.0;
                inherit: "default" 0.0;
-               image.normal: "00_button_edit_press.png";
+               image {
+                  normal: "00_button_edit_press.png";
+               }
             }
          }
-         part {
-            name: "padding_left_top";
+         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;
+               rel2 {
+                  relative: 0.0 0.0;
+               }
                min: BUTTON_CONTACT_DELETE_PADDING_LEFT_TOP_MIN_INC;
                fixed: 1 1;
                visible: 0;
             }
          }
-         part {
-            name: "padding_right_bottom";
+         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;
+               rel1 {
+                  relative: 1.0 1.0;
+               }
                min: BUTTON_CONTACT_DELETE_PADDING_RIGHT_BOTTOM_MIN_INC;
                fixed: 1 1;
                visible: 0;
             }
          }
-         part {
-            name: "padding_icon_text";
+         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: "elm.swallow.content"; }
-               rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; }
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "elm.swallow.content";
+               }
+               rel2 {
+                  to: "elm.swallow.content";
+               }
                fixed: 1 0;
                min: 0 0;
                visible: 0;
@@ -2659,28 +2676,46 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
          part { name: "elm.swallow.content";
             type: SWALLOW;
             scale: 1;
+            clip_to: "clipper";
             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"; }
+               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;
                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"; }
+               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";
+               }
                aspect: 1.0 1.0;
                aspect_preference: VERTICAL;
             }
             description { state: "icononly" 0.0;
-               visible: 1;
                min: BUTTON_CONTACT_DELETE_ICON_ICONONLY_MIN_INC;
-               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;
+               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: VERTICAL;
             }
@@ -2689,16 +2724,22 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             type: TEXT;
             mouse_events: 0;
             scale: 1;
+            clip_to: "clipper";
             description { state: "default" 0.0;
-               rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; }
-               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
-               align: 0.5 0.5;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to_x: "padding_icon_text";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "padding_right_bottom";
+               }
                color: BUTTON_TEXT_CONTACTS_DELETE_NORMAL_COLOR_INC;
                text {
                   font: "SLP:style=Medium";
                   size: BUTTON_CONTACT_DELETE_FONT_SIZE_INC;
                   min: 1 0;
-                  align: 0.5 0.5;
                   text: "Delete";
                   max: 1 0;
                }
@@ -2708,7 +2749,6 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             }
             description { state: "clicked" 0.0;
                inherit: "default" 0.0;
-               visible: 1;
                color: BUTTON_TEXT_CONTACTS_DELETE_PRESSED_COLOR_INC;
             }
             description { state: "disabled" 0.0;
@@ -2721,14 +2761,12 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             }
             description { state: "focused" 0.0;
                inherit: "default" 0.0;
-               visible: 1;
                min: 0 0;
                color: BUTTON_TEXT_CONTACTS_DELETE_PRESSED_COLOR_INC;
             }
          }
          part { name: "over2";
             type: RECT;
-            mouse_events: 1;
             repeat_events: 1;
             ignore_flags: ON_HOLD;
             description { state: "default" 0.0;
@@ -2737,12 +2775,17 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
          }
          part { name: "over3";
             type: RECT;
-            mouse_events: 1;
             repeat_events: 1;
             description { state: "default" 0.0;
                color: 0 0 0 0;
             }
          }
+         part { name: "clipper";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
          part { name: "disabler";
             type: RECT;
             description { state: "default" 0.0;
@@ -2773,7 +2816,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.text", st, 30, vl);
                if (!strcmp(st, "visible"))
-                  set_state(PART:"elm.text", "clicked", 0.0);
+                 set_state(PART:"elm.text", "clicked", 0.0);
             }
          }
          program { name: "button_unpress";
@@ -2787,12 +2830,12 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                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);
+                 {
+                    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;
          }
@@ -2809,11 +2852,11 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                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);
-               }
-               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"padding_icon_text", "visible", 0.0);
+                 }
+               if (get_int(button_state) != BUTTON_STATE_DISABLED)
                  set_state(PART:"elm.text", "visible", 0.0);
                else
                  set_state(PART:"elm.text", "disabled_visible", 0.0);
@@ -2827,10 +2870,10 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                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.swallow.content", "icononly", 0.0);
+                    set_state(PART:"padding_icon_text", "icononly", 0.0);
+                 }
                set_state(PART:"elm.text", "default", 0.0);
             }
          }
@@ -2842,15 +2885,15 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                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);
-               }
+                 {
+                    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);
-               }
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"padding_icon_text", "icononly", 0.0);
+                 }
             }
          }
          program { name: "icon_hide";
@@ -2874,9 +2917,9 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.text", st, 30, vl);
                if (!strcmp(st, "visible"))
-                  set_state(PART:"elm.text", "disabled_visible", 0.0);
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
                else
-                  set_state(PART:"elm.text", "disabled", 0.0);
+                 set_state(PART:"elm.text", "disabled", 0.0);
                set_int(button_state, BUTTON_STATE_DISABLED);
             }
          }
@@ -2894,9 +2937,9 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.text", st, 30, vl);
                if (!strcmp(st, "disabled_visible"))
-                  set_state(PART:"elm.text", "visible", 0.0);
+                 set_state(PART:"elm.text", "visible", 0.0);
                else
-                  set_state(PART:"elm.text", "default", 0.0);
+                 set_state(PART:"elm.text", "default", 0.0);
                set_int(button_state, BUTTON_STATE_ENABLED);
             }
          }