From 091f83ea9b8385e0679c4c84c65d525f9e2146e4 Mon Sep 17 00:00:00 2001 From: Amit Kamboj Date: Thu, 13 Jun 2013 10:12:17 +0530 Subject: [PATCH] [Button] Added focus to button circle styles. Change-Id: I33dc249d6bcf775705e4422cbc88a3226259291f --- themes/widgets/button.edc | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/themes/widgets/button.edc b/themes/widgets/button.edc index a3e043b..19e0e55 100644 --- a/themes/widgets/button.edc +++ b/themes/widgets/button.edc @@ -2812,10 +2812,14 @@ /////////////////////////////////////////////////////////////////////////////////////// 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"; @@ -2898,6 +2902,26 @@ 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; @@ -2989,6 +3013,18 @@ 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"; + } } } @@ -2996,12 +3032,16 @@ #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"; \ @@ -3038,6 +3078,26 @@ 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; \ @@ -3136,6 +3196,18 @@ 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"; \ + } \ } \ } /////////////////////////////////////////////////////////////////////////////////////// -- 2.7.4