From: Jehun Lim Date: Tue, 14 Jul 2015 11:56:19 +0000 (+0900) Subject: modify the width of menu button to be flexible X-Git-Tag: accepted/tizen/tv/20150728.070555~59^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9025a89562bf91b665362fd5796ca471441844b2;p=profile%2Ftv%2Fapps%2Fnative%2Fair_mediahub.git modify the width of menu button to be flexible Change-Id: If5000c5552444e1726eba66946841c580addbcf0 Signed-off-by: Jehun Lim --- diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc index f203cd3..1c77cb9 100644 --- a/res/edc/widgets/button.edc +++ b/res/edc/widgets/button.edc @@ -28,7 +28,57 @@ group { scale: 1; description { state: "default" 0.0; - min: 200 81; + min: 0 82; + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS; + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + } + } + part { + name: "bg_left"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "elm.text"; + rel2 { + to: "elm.text"; + relative: 0.0 1.0; + } + min: 40 0; + align: 1.0 0.5; + fixed: 1 0; + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS; + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + } + } + part { + name: "bg_right"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "elm.text"; + relative: 1.0 0.0; + } + rel2.to: "elm.text"; + min: 40 0; + align: 0.0 0.5; + fixed: 1 0; } description { state: "focused" 0.0; @@ -46,17 +96,16 @@ group { scale: 1; description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; text { font: FONT_LIGHT; size: 31; + min: 1 0; align: 0.5 0.5; + ellipsis: -1; } - min: 82 0; - align: 0.0 0.5; + min: 0 82; color: COLOR_TEXT_MENU; - align: 0.0 0.0; + fixed: 0 1; } description { state: "focused" 0.0; @@ -108,6 +157,8 @@ group { source: "elm"; action: STATE_SET "focused" 0.0; target: "bg"; + target: "bg_left"; + target: "bg_right"; target: "elm.text"; target: "bottom_line"; transition: LINEAR TRANSITION_TIME; @@ -118,6 +169,8 @@ group { source: "elm"; action: STATE_SET "default" 0.0; target: "bg"; + target: "bg_left"; + target: "bg_right"; target: "elm.text"; target: "bottom_line"; transition: LINEAR TRANSITION_TIME; diff --git a/src/view/base.c b/src/view/base.c index 8e92b44..f2411d7 100644 --- a/src/view/base.c +++ b/src/view/base.c @@ -27,6 +27,7 @@ #define TITLE_TEXT "Media Hub" #define MENU_BTN_SIZE 3 +#define BOX_PADDING_SIZE 80 struct _priv { Evas_Object *win; @@ -130,6 +131,7 @@ static bool _draw_menu_btn(struct _priv *priv) } elm_box_horizontal_set(box, EINA_TRUE); + elm_box_padding_set(box, BOX_PADDING_SIZE, 0); evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);