[button] Add more focus styles.
authorWooHyun Jung <wh0705.jung@samsung.com>
Thu, 30 May 2013 06:18:28 +0000 (15:18 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 11:35:51 +0000 (20:35 +0900)
Conflicts:

themes/widgets/button.edc

Change-Id: Ia6c36c7b59efae6b9937141030ad09169e291463

themes/inc/tizen-hd-inc.edc
themes/widgets/button.edc

index 13a9d3d..54bdaeb 100644 (file)
 #define BUTTON_JUMP_TOP_PADDING_TO_SCROLLER_MIN_MAX_INC 26 18
 #define BUTTON_JUMP_LEFT_PADDING_TO_SCROLLER_MIN_MAX_INC 26 18
 
+#define BUTTON_FOCUS_DIALOGUE_LEFT_PADDING_INC 16 0
+#define BUTTON_FOCUS_DIALOGUE_RIGHT_PADDING_INC 16 0
+
 #define CHECK_DEFAULT_TEXT_FONT_SIZE_INC 36
 
 #define CHECK_ONOFF_BG_NORMAL_MIN_MAX_INC 135 63
index 6bde784..33e4733 100644 (file)
@@ -7469,7 +7469,7 @@ group { name: "elm/button/base/bubble_circle/sent";
 
    group { name: "elm/button/base/focus";
       parts {
-         part { name: "elm.content.swallow";
+         part { name: "elm.swallow.content";
             type: SWALLOW;
             scale: 1;
             description { state: "default" 0.0;
@@ -7507,6 +7507,190 @@ group { name: "elm/button/base/bubble_circle/sent";
       }
    }
 
+#define BUTTON_DIALOGUE_FOCUS_STYLES(style_name, image_normal) \
+   group { name: "elm/button/base/"style_name; \
+      data { \
+         item: "focus_highlight" "on"; \
+      } \
+      images { \
+         image: image_normal COMP; \
+      } \
+      parts { \
+         part { name: "focus_image_left_padding"; \
+            type: SPACER; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               min: BUTTON_FOCUS_DIALOGUE_LEFT_PADDING_INC; \
+               rel2.relative: 0.0 1.0; \
+               align: 0.0 0.5; \
+            } \
+         } \
+         part { name: "focus_image_right_padding"; \
+            type: SPACER; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               min: BUTTON_FOCUS_DIALOGUE_RIGHT_PADDING_INC; \
+               rel1.relative: 1.0 0.0; \
+               align: 1.0 0.5; \
+            } \
+         } \
+         part { name: "elm.swallow.content"; \
+            type: SWALLOW; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+            } \
+         } \
+         part { name: "focus_image"; \
+            scale: 1; \
+            mouse_events: 0; \
+            repeat_events: 1; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+               rel1 { \
+                  relative: 1.0 0.0; \
+                  to_x: "focus_image_left_padding"; \
+               } \
+               rel2 { \
+                  relative: 0.0 1.0; \
+                  to_x: "focus_image_right_padding"; \
+               } \
+               image { \
+                  normal: image_normal; \
+                  border: 6 6 6 6; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "focused" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+         part { name: "over2"; \
+            type: RECT; \
+            repeat_events: 1; \
+            ignore_flags: ON_HOLD; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "over3"; \
+            type: RECT; \
+            repeat_events: 1; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+      } \
+      programs { \
+         program { name: "button_click"; \
+            signal: "mouse,down,1"; \
+            source: "over2"; \
+            action: SIGNAL_EMIT "elm,action,press" ""; \
+         } \
+         program { name: "button_unclick"; \
+            signal: "mouse,up,1"; \
+            source: "over3"; \
+            action: SIGNAL_EMIT "elm,action,unpress" ""; \
+         } \
+         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"; \
+         } \
+      } \
+   } \
+
+BUTTON_DIALOGUE_FOCUS_STYLES("dialogue_focus_top", "00_list_group_bg_top_focus.png")
+BUTTON_DIALOGUE_FOCUS_STYLES("dialogue_focus_center", "00_list_group_bg_center_focus.png")
+BUTTON_DIALOGUE_FOCUS_STYLES("dialogue_focus_bottom", "00_list_group_bg_bottom_focus.png")
+
+#define BUTTON_DEFAULT_FOCUS_STYLES(style_name, image_normal) \
+   group { name: "elm/button/base/"style_name; \
+      data { \
+         item: "focus_highlight" "on"; \
+      } \
+      images { \
+         image: image_normal COMP; \
+      } \
+      parts { \
+         part { name: "elm.swallow.content"; \
+            type: SWALLOW; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+            } \
+         } \
+         part { name: "focus_image"; \
+            scale: 1; \
+            mouse_events: 0; \
+            repeat_events: 1; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+               image { \
+                  normal: image_normal; \
+                  border: 6 6 6 6; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "focused" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+         part { name: "over2"; \
+            type: RECT; \
+            repeat_events: 1; \
+            ignore_flags: ON_HOLD; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "over3"; \
+            type: RECT; \
+            repeat_events: 1; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+      } \
+      programs { \
+         program { name: "button_click"; \
+            signal: "mouse,down,1"; \
+            source: "over2"; \
+            action: SIGNAL_EMIT "elm,action,press" ""; \
+         } \
+         program { name: "button_unclick"; \
+            signal: "mouse,up,1"; \
+            source: "over3"; \
+            action: SIGNAL_EMIT "elm,action,unpress" ""; \
+         } \
+         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"; \
+         } \
+      } \
+   } \
+
+BUTTON_DEFAULT_FOCUS_STYLES("focus_top", "00_list_group_bg_top_focus.png")
+BUTTON_DEFAULT_FOCUS_STYLES("focus_center", "00_list_group_bg_center_focus.png")
+BUTTON_DEFAULT_FOCUS_STYLES("focus_bottom", "00_list_group_bg_bottom_focus.png")
+
    group { name: "elm/button/base/search_rename";
       inherit: "elm/button/base/editfield_rename";
       parts {