[button] Add search_icon button style.
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 31 May 2013 13:03:10 +0000 (22:03 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 11:36:59 +0000 (20:36 +0900)
Change-Id: I2cd4650631b85ccbe8c03b937c8c31a28410d5e5

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

index f63dee6..64f5d7c 100755 (executable)
 #define BUTTON_DEFAULT_STYLE_MULTILINE_BG_MIN_INC 100 80
 #define BUTTON_DEFAULT_STYLE_MULTILINE_PADDING_MIN_INC 12 0
 
+#define BUTTON_SEARCH_ICON_MIN_MAX_INC 45 45
+#define BUTTON_SEARCH_ICON_CLIPPER_DEFAULT_COLOR_INC 128 128 128 255
+#define BUTTON_SEARCH_ICON_CLIPPER_DISABLED_COLOR_INC 128 128 128 76
+
 #define BUTTON_EDITFIELD_RENAME_BUTTON_MIN_MAX_INC 54 54
 #define BUTTON_EDITFIELD_RENAME_BUTTON_CLIPPER_DEFAULT_COLOR_INC 128 128 128 255
 #define BUTTON_EDITFIELD_RENAME_BUTTON_CLIPPER_PRESSED_COLOR_INC 59 115 182 255
index d76681b..3db0e40 100644 (file)
@@ -7704,6 +7704,97 @@ 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_icon";
+      images {
+         image: "00_search_icon.png" COMP;
+      }
+      parts {
+         part { name: "search_icon";
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "search_icon.clipper";
+            description { state: "default" 0.0;
+               min: BUTTON_SEARCH_ICON_MIN_MAX_INC;
+               max: BUTTON_SEARCH_ICON_MIN_MAX_INC;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               image.normal: "00_search_icon.png";
+            }
+         }
+         part { name: "search_icon.clipper";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: BUTTON_SEARCH_ICON_CLIPPER_DEFAULT_COLOR_INC;
+            }
+            description { state: "disabled" 0.0;
+               color: BUTTON_SEARCH_ICON_CLIPPER_DISABLED_COLOR_INC;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            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;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+         }
+         program { name: "button_double_click";
+            signal: "mouse,down,1,double";
+            source: "over1";
+         }
+         program { name: "button_unclick";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "touch_snd";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            after: "button_unclick3";
+         }
+         program { name: "button_unclick3";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "disabler";
+            target: "search_icon.clipper";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "disabler";
+            target: "search_icon.clipper";
+         }
+      }
+   }
    group { name: "elm/button/base/search_rename";
       inherit: "elm/button/base/editfield_rename";
       parts {
@@ -7715,7 +7806,7 @@ BUTTON_DEFAULT_FOCUS_STYLES("focus_bottom", "00_list_group_bg_bottom_focus.png")
                min: BUTTON_SEARCH_RENAME_BUTTON_MIN_MAX_INC;
                max: BUTTON_SEARCH_RENAME_BUTTON_MIN_MAX_INC;
                fixed: 1 1;
-               align: 0.0 0.5;
+               align: 0.5 0.5;
                image.normal: "00_edit_field_rename.png";
             }
          }
@@ -7733,7 +7824,7 @@ BUTTON_DEFAULT_FOCUS_STYLES("focus_bottom", "00_list_group_bg_bottom_focus.png")
                min: BUTTON_SEARCH_CLEAR_BUTTON_MIN_MAX_INC;
                max: BUTTON_SEARCH_CLEAR_BUTTON_MIN_MAX_INC;
                fixed: 1 1;
-               align: 0.0 0.5;
+               align: 0.5 0.5;
                image.normal: "00_edit_field_clear.png";
             }
          }