diff options
author | Thiep Ha <thiep.ha@samsung.com> | 2015-07-17 14:27:39 +0900 |
---|---|---|
committer | Thiep Ha <thiep.ha@samsung.com> | 2015-07-17 14:27:39 +0900 |
commit | e5b5d525a1ea4a7d310f63094b2c56e95e870665 (patch) | |
tree | 53f74137e1ebb80592260110d32d40e39907519c /mobile/widgets/entry.edc | |
parent | 6330dd8778498581bb61a41a8b9c495865fd90fa (diff) | |
download | efl-theme-tizen-mobile-e5b5d525a1ea4a7d310f63094b2c56e95e870665.tar.gz efl-theme-tizen-mobile-e5b5d525a1ea4a7d310f63094b2c56e95e870665.tar.bz2 efl-theme-tizen-mobile-e5b5d525a1ea4a7d310f63094b2c56e95e870665.zip |
entry: support hide cursor when entry has selection
Change-Id: I5759723a9d671f3f4bdea6b8bbf78cceb81c62b2
Diffstat (limited to 'mobile/widgets/entry.edc')
-rw-r--r-- | mobile/widgets/entry.edc | 129 |
1 files changed, 61 insertions, 68 deletions
diff --git a/mobile/widgets/entry.edc b/mobile/widgets/entry.edc index c152ff27..96ce5094 100644 --- a/mobile/widgets/entry.edc +++ b/mobile/widgets/entry.edc @@ -2268,51 +2268,13 @@ group { name: "elm/entry/base-password/default"; } group { name: "elm/entry/cursor/default"; + min: 1 0; parts { - part { name: "clip2"; + part { name: "cursor"; type: RECT; mouse_events: 0; scale: 1; - description { state: "default" 0.0; - rel1.to: "clip"; - rel2.to: "clip"; - visible: 0; - } - description { state: "focused" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "clip"; - type: RECT; - mouse_events: 0; - scale: 1; - clip_to: "clip2"; - description { state: "default" 0.0; - rel1.offset: -10 0; - rel2.offset: 9 9; - } - description { state: "hidden" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { name: "base"; - type: RECT; - mouse_events: 0; - scale: 1; - clip_to: "clip"; - description { state: "default" 0.0; - min: ENTRY_CURSOR_SIZE_INC; - align: 0.5 1.0; - color: 0 0 0 0; - } - } - part { name: "glow"; - type: RECT; - mouse_events: 0; - scale: 1; - clip_to: "clip2"; + clip_to: "clipper"; description { state: "default" 0.0; min: ENTRY_CURSOR_SIZE_INC; fixed: 1 0; @@ -2326,8 +2288,19 @@ group { name: "elm/entry/cursor/default"; offset: 0 -2; } color: 0 184 230 255; /*(Changeable UI) color_class: "F052";*/ + visible: 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; visible: 1; } + } + part { name: "clipper"; type: RECT; + description { state: "default" 0.0; + rel1.to: "cursor"; + rel2.to: "cursor"; + fixed: 1 1; + } description { state: "hidden" 0.0; inherit: "default" 0.0; visible: 0; @@ -2335,49 +2308,69 @@ group { name: "elm/entry/cursor/default"; } } programs { - program { name: "show"; + program { + signal: "selection,start"; + source: "elm.text"; action: STATE_SET "hidden" 0.0; - in: 0.6 0.0; - target: "glow"; - after: "show4"; + target: "clipper"; } - program { name: "show4"; + program { + signal: "selection,cleared"; + source: "elm.text"; action: STATE_SET "default" 0.0; - in: 0.6 0.0; - target: "glow"; - after: "show"; + target: "clipper"; } - program { name: "focused"; + program { signal: "elm,action,focus"; source: "elm"; - action: STATE_SET "focused" 0.0; - target: "clip2"; - after: "show4"; + action: ACTION_STOP; + target: "cursor_show"; + target: "cursor_hide"; + target: "cursor_show_timer"; + target: "cursor_hide_timer"; + after: "cursor_show"; } - program { name: "unfocused"; + program { signal: "elm,action,unfocus"; source: "elm"; - action: STATE_SET "default" 0.0; - target: "clip2"; - after: "stop_glow"; - } - program { name: "stop_glow"; action: ACTION_STOP; - target: "show"; - target: "show4"; + target: "cursor_show"; + target: "cursor_hide"; + target: "cursor_show_timer"; + target: "cursor_hide_timer"; + after: "cursor_hide_stop"; } - program { name: "show_cursor"; + program { signal: "elm,action,show,cursor"; source: "elm"; action: ACTION_STOP; - target: "show"; - target: "show4"; - after: "show_cursor1"; + target: "cursor_show"; + target: "cursor_hide"; + target: "cursor_show_timer"; + target: "cursor_hide_timer"; + after: "cursor_show"; + } + program { name: "cursor_hide_stop"; + action: STATE_SET "default" 0.0; + target: "cursor"; + } + program { name: "cursor_show"; + action: STATE_SET "visible" 0.0; + target: "cursor"; + after: "cursor_show_timer"; } - program { name: "show_cursor1"; + program { name: "cursor_hide"; action: STATE_SET "default" 0.0; - target: "glow"; - after: "show"; + target: "cursor"; + after: "cursor_hide_timer"; + } + program { name: "cursor_show_timer"; + in: 0.6 0.0; + after: "cursor_hide"; + } + program { name: "cursor_hide_timer"; + in: 0.6 0.0; + after: "cursor_show"; } } } |