From 89a11875de341cbb2275abe65f6719d78de8c1b6 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 21 Jul 2015 16:07:42 +0900 Subject: [PATCH] add down arrow for user edit Change-Id: Ibfc97a37092bbe81fdec92bd9653b25d90e6190d Signed-off-by: Soohye Shin --- edje/view/baritem.edc | 17 ++++++++- edje/view/user.edc | 104 ++++++++++++++++++++++++++++++++++++++++++++++---- src/view/view_user.c | 1 + 3 files changed, 113 insertions(+), 9 deletions(-) diff --git a/edje/view/baritem.edc b/edje/view/baritem.edc index 400f4cf..5cf3693 100644 --- a/edje/view/baritem.edc +++ b/edje/view/baritem.edc @@ -31,6 +31,19 @@ group { description { state, "default" 0.0; min, 158 158; + visible, 0; + } + } + part { + name, "pad"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 158 158; + rel2.relative, 0.0 0.0; + align, 0.0 0.0; + fixed, 1 1; } } part { @@ -81,7 +94,9 @@ group { clip_to, "clip"; description { state, "default" 0.0; - min, 158 158; + rel1.to, "pad"; + rel2.to, "pad"; + fixed, 1 1; } } part { diff --git a/edje/view/user.edc b/edje/view/user.edc index f1244c4..8bcd7e3 100644 --- a/edje/view/user.edc +++ b/edje/view/user.edc @@ -89,7 +89,7 @@ group { to, "pad.list"; relative, 1.0 1.0; } - min, 1422 158; + min, 1422 228; align, 0.5 0.0; fixed, 1 1; } @@ -101,8 +101,21 @@ group { name, GRP_USER_ITEM; inherit, GRP_BAR_ITEM; data.item, TITLE_WIDTH "130"; + images { + image, "btn_navigation_down.png" COMP; + } parts { part { + name, "bg"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 158 228; + visible, 0; + } + } + part { name, "pad.icon"; type, RECT; scale, 1; @@ -141,10 +154,16 @@ group { scale, 1; description { state, "default" 0.0; - min, 0 24; - rel1.relative, 0.5 1.0; - rel2.relative, 0.5 1.0; - align, 0.5 1.0; + min, 0 12; + rel1 { + to, PART_BAR_ITEM_ICON; + relative, 0.5 1.0; + } + rel2 { + to, PART_BAR_ITEM_ICON; + relative, 0.5 1.0; + } + align, 0.5 0.0; fixed, 1 1; visible, 0; } @@ -157,13 +176,13 @@ group { state, "default" 0.0; rel1 { to, "pad.text"; - relative, 0.0 0.0; + relative, 1.0 1.0; } rel2 { to, "pad.text"; - relative, 0.0 0.0; + relative, 1.0 1.0; } - align, 0.5 1.0; + align, 0.5 0.0; fixed, 1 1; min, 130 22; } @@ -223,5 +242,74 @@ group { rel2.to, PART_BAR_ITEM_LOCK; } } + part { + name, "text"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 158 50; + rel1 { + to, "pad"; + relative, 0.5 1.0; + } + rel2 { + to, "pad"; + relative, 0.5 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + text { + size, 26; + font, "TizenSans"; + text, "Edit"; + } + color, 255 255 255 178; + visible, 0; + } + description { + state, "focus"; + inherit, "default" 0.0; + visible, 1; + } + } + part { + name, "arrow"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 86 30; + rel1.relative, 0.5 1.0; + rel2.relative, 0.5 1.0; + image.normal, "btn_navigation_down.png"; + align, 0.5 1.0; + fixed, 1 1; + visible, 0; + } + description { + state, "focus"; + inherit, "default" 0.0; + visible, 1; + } + } + } + programs { + program { + name, "sig,show,arrow"; + signal, SIG_FOCUS; + source, SRC_PROG; + action, STATE_SET "focus"; + target, "text"; + target, "arrow"; + } + program { + name, "sig,hide,arrow"; + signal, SIG_UNFOCUS; + source, SRC_PROG; + action, STATE_SET "default"; + target, "text"; + target, "arrow"; + } } } diff --git a/src/view/view_user.c b/src/view/view_user.c index cdbe5d1..d13782e 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -296,6 +296,7 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, if (!bg) goto err; + evas_object_size_hint_align_set(eo, 0.5, 0.0); inputmgr_add_callback(eo, INPUT_HANDLER_TYPE_EO, &handler, bi); elm_box_pack_end(box, eo); evas_object_show(eo); -- 2.7.4