[Button] Added focus to button circle styles.
authorAmit Kamboj <amit.kamboj@samsung.com>
Thu, 13 Jun 2013 04:42:17 +0000 (10:12 +0530)
committerSungho Kwak <sungho1.kwak@samsung.com>
Thu, 20 Jun 2013 12:38:45 +0000 (21:38 +0900)
Change-Id: I33dc249d6bcf775705e4422cbc88a3226259291f

themes/widgets/button.edc

index a3e043b..19e0e55 100644 (file)
 
 ///////////////////////////////////////////////////////////////////////////////////////
    group { name: "elm/button/base/circle/empty";
+      data {
+         item: "focus_highlight" "on";
+      }
       images {
          image: "00_circle_button.png" COMP;
          image: "00_circle_button_press.png" COMP;
          image: "00_circle_button_dim.png" COMP;
+         image: 00_circle_button_focus.png COMP;
       }
       parts {
          part { name: "button_image";
                color: BUTTON_CIRCLE_STYLE_DISABLED_COLOR_INC;
             }
          }
+         part { name: "focus_image";
+            scale: 1;
+            mouse_events: 0;
+            repeat_events: 1;
+              description { state: "default" 0.0;
+                 min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC;
+                 max: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC;
+                 visible: 0;
+                 rel1.to : "button_image";
+                 rel2.to : "button_image";
+                 image {
+                  normal: "00_circle_button_focus.png";
+                  border_scale: 1;
+               }
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
          part { name: "over1";
             type: RECT;
             ignore_flags: ON_HOLD;
             action: STATE_SET "default" 0.0;
             target: "elm.swallow.content";
          }
+         program { name: "action_focus";
+            signal: "elm,action,focus_highlight,show";
+            source: "elm";
+            action: STATE_SET "focused" 0.0;
+            target: "focus_image";
+         }
+         program { name: "action_unfocus";
+            signal: "elm,action,focus_highlight,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "focus_image";
+         }
       }
    }
 
 #define BUTTON_EDIT_STYLES(style_name, image_normal, image_press, min_width, min_height) \
    group { name: "elm/button/base/contacts/"style_name; \
    alias: "elm/button/base/"style_name; \
+      data { \
+         item: "focus_highlight" "on"; \
+      } \
       images { \
          image: "00_circle_button.png" COMP; \
          image: "00_circle_button_press.png" COMP; \
          image: "00_circle_button_dim.png" COMP; \
          image: edit_normal COMP; \
          image: edit_press COMP; \
+         image: 00_circle_button_focus.png COMP; \
       } \
       parts { \
          part { name: "button_image"; \
                inherit: "default" 0.0; \
             } \
          } \
+         part { name: "focus_image"; \
+            scale: 1; \
+            mouse_events: 0; \
+            repeat_events: 1; \
+              description { state: "default" 0.0; \
+                 min: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \
+                 max: BUTTON_CIRCLE_STYLE_BG_MIN_MAX_INC; \
+                 visible: 0; \
+                 rel1.to : "button_image"; \
+                 rel2.to : "button_image"; \
+                 image { \
+                  normal: "00_circle_button_focus.png"; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "focused" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
          part { name: "icon_clipper"; \
             scale: 1; \
             type: RECT; \
             target: "button_center_part"; \
             target: "icon_clipper"; \
          } \
+         program { name: "action_focus"; \
+            signal: "elm,action,focus_highlight,show"; \
+            source: "elm"; \
+            action: STATE_SET "focused" 0.0; \
+            target: "focus_image"; \
+         } \
+         program { name: "action_unfocus"; \
+            signal: "elm,action,focus_highlight,hide"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "focus_image"; \
+         } \
       } \
    }
 ///////////////////////////////////////////////////////////////////////////////////////