Fix layout bugs 31/46331/2
authorjinwoo.shin <jw0227.shin@samsung.com>
Wed, 19 Aug 2015 08:27:18 +0000 (17:27 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Wed, 19 Aug 2015 08:28:27 +0000 (17:28 +0900)
Change-Id: Ib1401b2a3af3d090a1db0fbea1a7c84b9b66d1f2
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
data/widget/button.edc
src/view_action_menu.c

index 0e37d8e..bfcd086 100644 (file)
@@ -212,7 +212,7 @@ group {
                        {
                                set_int(is_toggle, 0);
                                set_int(is_enabled, 1);
-                               set_int(is_focused, 1);
+                               set_int(is_focused, 0);
                                set_int(is_init, 1);
                                set_int(cur_state, -1);
                        }
@@ -228,9 +228,10 @@ group {
                        foc = get_int(is_focused);
                        sel = get_int(is_selected);
                        c_state = get_int(cur_state);
+
                        if(enab == 0)
                        {
-                               if(c_state == DISABLED)
+                               if(c_state != DISABLED)
                                {
                                        if (togg == 0)
                                        {
@@ -247,7 +248,7 @@ group {
                        {
                                if(foc == 1)
                                {
-                                       if(c_state == FOCUSED)
+                                       if(c_state != FOCUSED)
                                        {
                                                if (togg == 0)
                                                {
@@ -262,7 +263,7 @@ group {
                                }
                                else if(sel == 1)
                                {
-                                       if(c_state == SELECTED)
+                                       if(c_state != SELECTED)
                                        {
                                                if (togg == 0)
                                                {
@@ -277,7 +278,7 @@ group {
                                }
                                else
                                {
-                                       if(c_state == DEFAULT)
+                                       if(c_state != DEFAULT)
                                        {
                                                if (togg == 0)
                                                {
@@ -833,7 +834,7 @@ group {
                }
                program {
                        name: "go_focused";
-                       signal: "elm,state,focused";
+                       signal: "elm,action,focus";
                        source: "elm";
                        script {
                                init_values();
@@ -843,7 +844,7 @@ group {
                }
                program {
                        name: "go_unfocused";
-                       signal: "elm,state,unfocused";
+                       signal: "elm,action,unfocus";
                        source: "elm";
                        script {
                                init_values();
index 6e428e7..1ab1cf8 100644 (file)
@@ -224,6 +224,11 @@ static bool _draw_menu_area(struct _priv *priv)
                i++;
        }
 
+       elm_object_focus_next_object_set(priv->menu_btn[0],
+                       priv->menu_btn[i - 1], ELM_FOCUS_LEFT);
+       elm_object_focus_next_object_set(priv->menu_btn[i - 1],
+                       priv->menu_btn[0], ELM_FOCUS_RIGHT);
+
        while (col + 1 != ITEMS_IN_ROW) {
                btn = util_add_button(priv->base, NULL, NULL,
                                STYLE_ACTION_MENU_BTN);
@@ -233,6 +238,8 @@ static bool _draw_menu_area(struct _priv *priv)
                        return false;
                }
 
+               elm_object_disabled_set(btn, EINA_TRUE);
+
                col = i % ITEMS_IN_ROW;
 
                elm_table_pack(table, btn, col, row, 1, 1);
@@ -240,11 +247,6 @@ static bool _draw_menu_area(struct _priv *priv)
                i++;
        }
 
-       elm_object_focus_next_object_set(priv->menu_btn[0],
-                       priv->menu_btn[i - 1], ELM_FOCUS_LEFT);
-       elm_object_focus_next_object_set(priv->menu_btn[i - 1],
-                       priv->menu_btn[0], ELM_FOCUS_RIGHT);
-
        return true;
 }