diff options
author | JunsuChoi <jsuya.choi@samsung.com> | 2017-01-12 21:18:56 +0900 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-06-02 05:22:38 +0000 |
commit | 814bc44e54b57815eca0f7751956d3a1c2d6db68 (patch) | |
tree | dfa30647a9250676c8662fc3a23f2080acf28159 /mobile/widgets | |
parent | 463fd8f6aaa58bbe150f92a7e215ceb7cd932117 (diff) | |
download | efl-theme-tizen-mobile-814bc44e54b57815eca0f7751956d3a1c2d6db68.tar.gz efl-theme-tizen-mobile-814bc44e54b57815eca0f7751956d3a1c2d6db68.tar.bz2 efl-theme-tizen-mobile-814bc44e54b57815eca0f7751956d3a1c2d6db68.zip |
[Button] Add set_ignore_flags with ON_HOLD or NONE
It will not be pressed when ON_HOLD due to scroll.
Change-Id: I8b548d192244306e7f740d8a9f73b8291b4fb788
Diffstat (limited to 'mobile/widgets')
-rw-r--r-- | mobile/widgets/button.edc | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/mobile/widgets/button.edc b/mobile/widgets/button.edc index e705db55..aa9fdd66 100644 --- a/mobile/widgets/button.edc +++ b/mobile/widgets/button.edc @@ -24,6 +24,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#define IGNORE_FLAGS_NONE 0 +#define IGNORE_FLAGS_ON_HOLD 1 + group { "elm/button/event/default"; inherit_only: 1; parts { @@ -720,11 +724,19 @@ program_remove: "unpressed"; program_remove: "clicked"; programs { + program { "load"; + signal: "load"; + source: ""; + script { + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); + } + } program { "on_pressed"; script { if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { stop_program(PROGRAM:"delay_unpressed_effect"); set_int(mouse_down, 1); + set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE); run_program(PROGRAM:"pressed_effect"); } } @@ -735,6 +747,7 @@ script { if (get_int(mouse_down) == 1) { set_int(mouse_down, 0); + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); if (get_int(animate) == 0) { emit("elm,action,unpress", ""); run_program(PROGRAM:"unpressed_effect"); @@ -1086,11 +1099,19 @@ program_remove: "unpressed"; program_remove: "clicked"; programs { + program { "load"; + signal: "load"; + source: ""; + script { + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); + } + } program { "on_pressed"; script { if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { stop_program(PROGRAM:"delay_unpressed_effect"); set_int(mouse_down, 1); + set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE); run_program(PROGRAM:"pressed_effect"); } } @@ -1100,7 +1121,8 @@ source: "event"; script { if (get_int(mouse_down) == 1) { - set_int(mouse_down, 0); + set_int(mouse_down, 0); + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); if (get_int(animate) == 0) { emit("elm,action,unpress", ""); run_program(PROGRAM:"unpressed_effect"); @@ -1371,12 +1393,20 @@ program_remove: "unpressed"; program_remove: "clicked"; programs { + program { "load"; + signal: "load"; + source: ""; + script { + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); + } + } program { "on_pressed"; script { if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { stop_program(PROGRAM:"delay_unpressed_effect"); set_int(mouse_down, 1); set_int(animate, 1); + set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE); set_state(PART:"effect_spacer", "default", 0.0); get_circumscription_radius(PART:"effect_spacer", rel_x, rel_y); custom_state(PART:"effect_spacer", "default", 0.0); @@ -1393,6 +1423,7 @@ script { if (get_int(mouse_down) == 1) { set_int(mouse_down, 0); + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); if (get_int(disabled) == 0) { if (get_int(animate) == 0) { run_program(PROGRAM:"unpressed_effect"); @@ -2114,12 +2145,20 @@ group { "elm/button/base/"style_name; \ program_remove: "unpressed"; \ program_remove: "clicked"; \ programs { \ + program { "load"; \ + signal: "load"; \ + source: ""; \ + script { \ + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); \ + } \ + } \ program { "on_pressed"; \ script { \ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { \ stop_program(PROGRAM:"delay_unpressed_effect"); \ set_int(mouse_down, 1); \ set_int(animate, 1); \ + set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE); \ get_circumscription_radius(PART:"base", rel_x, rel_y); \ custom_state(PART:"effect_spacer", "default", 0.0); \ set_state(PART:"effect_spacer", "custom",0.0); \ @@ -2135,6 +2174,7 @@ group { "elm/button/base/"style_name; \ script { \ if (get_int(mouse_down) == 1) { \ set_int(mouse_down, 0); \ + set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); \ if (get_int(disabled) == 0) { \ if (get_int(animate) == 0) { \ run_program(PROGRAM:"unpressed_effect"); \ |