modify the width of menu button to be flexible 40/43840/1
authorJehun Lim <jehun.lim@samsung.com>
Tue, 14 Jul 2015 11:56:19 +0000 (20:56 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Tue, 14 Jul 2015 11:56:19 +0000 (20:56 +0900)
Change-Id: If5000c5552444e1726eba66946841c580addbcf0
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
res/edc/widgets/button.edc
src/view/base.c

index f203cd3..1c77cb9 100644 (file)
@@ -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;
index 8e92b44..f2411d7 100644 (file)
@@ -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);