From: WooHyun Jung Date: Thu, 30 May 2013 06:18:28 +0000 (+0900) Subject: [button] Add more focus styles. X-Git-Tag: submit/tizen/20131004.114939~253 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8336e13bde5590d6e2f0eddea35580d64ac77bf3;p=platform%2Fcore%2Fuifw%2Fefl-theme-tizen.git [button] Add more focus styles. Conflicts: themes/widgets/button.edc Change-Id: Ia6c36c7b59efae6b9937141030ad09169e291463 --- diff --git a/themes/inc/tizen-hd-inc.edc b/themes/inc/tizen-hd-inc.edc index 13a9d3d..54bdaeb 100644 --- a/themes/inc/tizen-hd-inc.edc +++ b/themes/inc/tizen-hd-inc.edc @@ -635,6 +635,9 @@ #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 diff --git a/themes/widgets/button.edc b/themes/widgets/button.edc index 6bde784..33e4733 100644 --- a/themes/widgets/button.edc +++ b/themes/widgets/button.edc @@ -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 {