summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-09-16 16:21:12 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-09-16 16:21:12 -0700
commita01fc4a7c17ff110625ff95457f488ffb6f02d4a (patch)
treed846286dc497988656365d3bc1322e5d6cfe6ef8
parent8bbcaa610b7952edf0f3058b0099d874c1cd71b9 (diff)
parenta1334e19feac5e2c29323e84625d33b47257cd59 (diff)
downloadair_livetv-a01fc4a7c17ff110625ff95457f488ffb6f02d4a.tar.gz
air_livetv-a01fc4a7c17ff110625ff95457f488ffb6f02d4a.tar.bz2
air_livetv-a01fc4a7c17ff110625ff95457f488ffb6f02d4a.zip
Merge "Add action menu show/hide animation" into tizen
-rw-r--r--data/view/action_menu.edc25
-rw-r--r--data/view/channelinfo.edc10
-rw-r--r--include/define.h3
-rw-r--r--src/view_action_menu.c17
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 a7d56b7..a116748 100644
--- a/src/view_action_menu.c
+++ b/src/view_action_menu.c
@@ -602,6 +602,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;
@@ -642,6 +655,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;
}
@@ -675,7 +690,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)