diff options
author | Bowon Ryu <bowon.ryu@samsung.com> | 2020-12-23 20:31:55 +0900 |
---|---|---|
committer | Bowon Ryu <bowon.ryu@samsung.com> | 2020-12-23 20:42:04 +0900 |
commit | f8815063eba7bfd52b74bc9047c02d094fa978f8 (patch) | |
tree | a1a2681a4fec92cd72180f40749f0fe1811dcedc | |
parent | d87a7a1b05b5bd091bc0d2552c6ef72f9af4aa22 (diff) | |
download | efl-theme-tizen-common-tizen_6.0.tar.gz efl-theme-tizen-common-tizen_6.0.tar.bz2 efl-theme-tizen-common-tizen_6.0.zip |
toolbar: fix item pressed issuesubmit/tizen_6.0/20201227.213038submit/tizen_6.0/20201224.015756accepted/tizen/6.0/unified/20201228.101255accepted/tizen/6.0/unified/20201228.101249tizen_6.0accepted/tizen_6.0_unified
fix wrong behavior when item is unpressed state.
Change-Id: Ieb183f6a76fc936542f81309700372e2d639b68b
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
-rw-r--r-- | common/widgets/toolbar.edc | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/common/widgets/toolbar.edc b/common/widgets/toolbar.edc index 31fa12b..a9c0dfa 100644 --- a/common/widgets/toolbar.edc +++ b/common/widgets/toolbar.edc @@ -62,6 +62,18 @@ group { "elm/toolbar/item/event/default"; source: "event"; after: "on_mouse_out"; } + /* Program for mouse_pressed_in event */ + program { "mouse_pressed_in"; + signal: "mouse,pressed,in"; + source: "event"; + after: "on_mouse_pressed_in"; + } + /* Program for mouse_pressed_out event */ + program { "mouse_pressed_out"; + signal: "mouse,pressed,out"; + source: "event"; + after: "on_mouse_pressed_out"; + } /* Program for enabled event */ program { "enabled"; signal: "elm,state,enabled"; @@ -773,6 +785,7 @@ group { "elm/toolbar/item/tabbar"; public item_state = ITEM_STATE_ENABLED; public icon_text = 0; public mouse_down = 0; + public mouse_in = 0; public multi_down = 0; public landscape = 0; public item_text = 0; @@ -917,6 +930,11 @@ group { "elm/toolbar/item/tabbar"; { set_state(PART:"elm.text", "text_normal", 0.0); set_state(PART:"clipper_elm.swallow.icon", "default", 0.0); + if (get_int(mouse_in) == 0) + { + set_state(PART:"line_top", "default", 0.0); + set_state(PART:"selected_line", "default", 0.0); + } } } } @@ -932,16 +950,28 @@ group { "elm/toolbar/item/tabbar"; } program { "on_mouse_in"; script { + set_int(mouse_in, 1); if (get_int(multi_down) == 0) emit("elm,mouse,in", "elm"); } } program { "on_mouse_out"; script { + set_int(mouse_in, 0); if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) emit("elm,mouse,out", "elm"); } } + program { "on_mouse_pressed_in"; + script { + set_int(mouse_in, 1); + } + } + program { "on_mouse_pressed_out"; + script { + set_int(mouse_in, 0); + } + } program { "selected_text"; script{ set_int(selected, 1); @@ -1600,6 +1630,7 @@ group { "elm/toolbar/item/tabbar_with_title"; public item_state = ITEM_STATE_ENABLED; public icon_text = 0; public mouse_down = 0; + public mouse_in = 0; public multi_down = 0; public landscape = 0; public item_text = 0; @@ -1744,6 +1775,11 @@ group { "elm/toolbar/item/tabbar_with_title"; { set_state(PART:"elm.text", "text_normal", 0.0); set_state(PART:"clipper_elm.swallow.icon", "default", 0.0); + if (get_int(mouse_in) == 0) + { + set_state(PART:"line_top", "default", 0.0); + set_state(PART:"selected_line", "default", 0.0); + } } } } @@ -1759,16 +1795,28 @@ group { "elm/toolbar/item/tabbar_with_title"; } program { "on_mouse_in"; script { + set_int(mouse_in, 1); if (get_int(multi_down) == 0) emit("elm,mouse,in", "elm"); } } program { "on_mouse_out"; script { + set_int(mouse_in, 0); if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) emit("elm,mouse,out", "elm"); } } + program { "on_mouse_pressed_in"; + script { + set_int(mouse_in, 1); + } + } + program { "on_mouse_pressed_out"; + script { + set_int(mouse_in, 0); + } + } program { "selected_text"; script{ set_int(selected, 1); @@ -2262,6 +2310,14 @@ group { "elm/toolbar/item/navigationbar"; emit("elm,mouse,out", "elm"); } } + program { "on_mouse_pressed_in"; + script { + } + } + program { "on_mouse_pressed_out"; + script { + } + } program { "on_disabled"; script { set_int(item_state, ITEM_STATE_DISABLED); |