diff options
author | jinwoo.shin <jw0227.shin@samsung.com> | 2015-09-16 13:54:21 +0900 |
---|---|---|
committer | jinwoo.shin <jw0227.shin@samsung.com> | 2015-09-16 13:54:21 +0900 |
commit | a1334e19feac5e2c29323e84625d33b47257cd59 (patch) | |
tree | ff08f28ce20a27ab370f33b1677cbead4a4b7922 | |
parent | fbfc2393cf390509957d19b78c9c8d19bff09f56 (diff) | |
download | air_livetv-a1334e19feac5e2c29323e84625d33b47257cd59.tar.gz air_livetv-a1334e19feac5e2c29323e84625d33b47257cd59.tar.bz2 air_livetv-a1334e19feac5e2c29323e84625d33b47257cd59.zip |
Add action menu show/hide animation
Change-Id: I15c3de46050f0635811b89ccc51d0934459f6a1a
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r-- | data/view/action_menu.edc | 25 | ||||
-rw-r--r-- | data/view/channelinfo.edc | 10 | ||||
-rw-r--r-- | include/define.h | 3 | ||||
-rw-r--r-- | src/view_action_menu.c | 17 |
4 files changed, 48 insertions, 7 deletions
diff --git a/data/view/action_menu.edc b/data/view/action_menu.edc index 1905e50..5d02e59 100644 --- a/data/view/action_menu.edc +++ b/data/view/action_menu.edc @@ -35,9 +35,14 @@ group { color, 255 255 255 255; rel1.relative, 1.0 0.0; min, 500 0; - align, 1.0 0.0; + align, 0.0 0.0; fixed, 1 1; } + description { + state, "show" 0.0; + inherit, "default" 0.0; + align, 1.0 0.0; + } } part { @@ -367,6 +372,24 @@ group { programs { program { + signal, SIGNAL_SHOW; + action, STATE_SET "show" 0.0; + target, "menu_area"; + transition, CUBIC_BEZIER 0.667 TRANSITION_EASE_IN_OUT; + } + program { + signal, SIGNAL_HIDE; + source, SOURCE_ELM; + action, STATE_SET "default" 0.0; + target, "menu_area"; + transition, CUBIC_BEZIER 0.334 TRANSITION_EASE_OUT; + after, "hide_finished"; + } + program { + name, "hide_finished"; + action, SIGNAL_EMIT SIGNAL_HIDE_FINISHED SOURCE_ELM; + } + program { name, "no_favorite"; signal, SIGNAL_NO_FAVORITE; source, SOURCE_ELM; diff --git a/data/view/channelinfo.edc b/data/view/channelinfo.edc index 8b7ece3..f9ce6a8 100644 --- a/data/view/channelinfo.edc +++ b/data/view/channelinfo.edc @@ -64,14 +64,14 @@ group { signal, SIGNAL_SHOW; action, STATE_SET "show" 0.0; target, PART_CONTENT; - transition, CUBIC_BEZIER 0.5 0.45 0.03 0.41 1.0; + transition, CUBIC_BEZIER 0.5 TRANSITION_EASE_IN_OUT; } program { signal, SIGNAL_HIDE; source, SOURCE_ELM; action, STATE_SET "default" 0.0; target, PART_CONTENT; - transition, CUBIC_BEZIER 0.167 0.25 0.46 0.45 1.0; + transition, CUBIC_BEZIER 0.167 TRANSITION_EASE_OUT; after, "hide_finished"; } program { @@ -359,7 +359,7 @@ group { name, "show_current"; action, STATE_SET "show" 0.0; target, "clip_current"; - transition, CUBIC_BEZIER 0.334 0.45 0.03 0.41 1.0; + transition, CUBIC_BEZIER 0.334 TRANSITION_EASE_IN_OUT; } program { name, "show_other"; @@ -368,14 +368,14 @@ group { target, PART_CHANNELINFO_LIST_NEXT; target, "clip_prev"; target, PART_CHANNELINFO_LIST_PREV; - transition, CUBIC_BEZIER 0.401 0.45 0.03 0.41 1.0; + transition, CUBIC_BEZIER 0.401 TRANSITION_EASE_IN_OUT; } program { signal, SIGNAL_HIDE; source, SOURCE_ELM; action, STATE_SET "default" 0.0; target, "bg"; - transition, CUBIC_BEZIER 0.167 0.25 0.46 0.45 1.0; + transition, CUBIC_BEZIER 0.167 TRANSITION_EASE_OUT; sequence { action, STATE_SET "default" 0.0; target, "clip_next"; diff --git a/include/define.h b/include/define.h index ac98f3d..b919392 100644 --- a/include/define.h +++ b/include/define.h @@ -66,6 +66,9 @@ #define COLOR_NOFAVORITE_BG 229 229 229 255 #define COLOR_NOFAVORITE_TEXT 0 0 0 178 +#define TRANSITION_EASE_IN_OUT 0.45 0.03 0.41 1.0 +#define TRANSITION_EASE_OUT 0.25 0.46 0.45 1.0 + #define IMAGE_FAV_NOR IMAGEDIR"/btn_menu_favorite_nor.png" #define IMAGE_FAV_FOC IMAGEDIR"/btn_menu_favorite_foc.png" #define IMAGE_FAV_SEL IMAGEDIR"/btn_menu_favorite_sel.png" diff --git a/src/view_action_menu.c b/src/view_action_menu.c index 6c21921..119708b 100644 --- a/src/view_action_menu.c +++ b/src/view_action_menu.c @@ -605,6 +605,19 @@ static void _draw_view_content(struct _priv *priv) _ERR("Draw bottom area failed."); } +static void _hide_finished_cb(void *data, Evas_Object *obj, + const char *emission, const char *source) +{ + struct _priv *priv; + + if (!data) + return; + + priv = data; + + evas_object_hide(priv->base); +} + static Evas_Object *_create(Evas_Object *win, void *data) { struct _priv *priv; @@ -645,6 +658,8 @@ static Evas_Object *_create(Evas_Object *win, void *data) _draw_view_content(priv); inputmgr_add_callback(priv->base, 0, &key_handler, priv); + elm_layout_signal_callback_add(priv->base, SIGNAL_HIDE_FINISHED, + SOURCE_ELM, _hide_finished_cb, priv); return base; } @@ -678,7 +693,7 @@ static void _hide(void *data) } priv = data; - evas_object_hide(priv->base); + elm_layout_signal_emit(priv->base, SIGNAL_HIDE, SOURCE_ELM); } static void _destroy(void *data) |