[button] Now circle buttons will show their own focus frame.
authorWooHyun Jung <wh0705.jung@samsung.com>
Tue, 4 Jun 2013 02:29:50 +0000 (11:29 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 11:37:33 +0000 (20:37 +0900)
themes/images/tizen-hd/Controls/00_circle_button_focus.png [new file with mode: 0755]
themes/widgets/button.edc

diff --git a/themes/images/tizen-hd/Controls/00_circle_button_focus.png b/themes/images/tizen-hd/Controls/00_circle_button_focus.png
new file mode 100755 (executable)
index 0000000..6712258
Binary files /dev/null and b/themes/images/tizen-hd/Controls/00_circle_button_focus.png differ
index df5772e..090c1cd 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////////////
 #define BUTTON_CIRCLE_STYLES(style_name, image_normal, image_press, min_width, min_height) \
    group { name: "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: image_normal COMP; \
          image: image_press 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; \
             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"; \
+         } \
       } \
    }