hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=4475f97d8a0e448696da6ca42be1585092a672ee

commit 4475f97d8a0e448696da6ca42be1585092a672ee
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Fri Aug 15 15:00:31 2014 +0900

    menu: improve ui.
---
 data/themes/default/layout_common.edc | 50 +++++++++++++----------------------
 src/bin/menu.c                        | 29 ++++----------------
 2 files changed, 24 insertions(+), 55 deletions(-)

diff --git a/data/themes/default/layout_common.edc 
b/data/themes/default/layout_common.edc
index b5075c5..913daf4 100644
--- a/data/themes/default/layout_common.edc
+++ b/data/themes/default/layout_common.edc
@@ -741,35 +741,6 @@ group { name: "warning_layout";
    }
 }
 
-group { name: "button_layout";
-   parts {
-      part { name: "elm.swallow.btn";
-         type: SWALLOW;
-         scale: 1;
-         description { state: "default" 0.0;
-            align: 0.5 0.5;
-            min: 50 50;
-            rel1.relative: 0.5 0.5;
-            rel2.relative: 0.5 0.5;
-            fixed: 1 1;
-         }
-         description { state: "zoom" 0.0;
-            inherit: "default" 0.0;
-            min: 80 80;
-         }
-      }
-   }
-   programs {
-      program { name: "btn_effect";
-         signal: "elm,action,btn,zoom";
-         source: "";
-         action: STATE_SET "zoom" 0.0;
-         target: "elm.swallow.btn";
-         transition: LINEAR 0.25;
-      }
-   }
-}
-
 group { name: "menu_layout";
    parts {
       part { name: "bg";
@@ -780,6 +751,9 @@ group { name: "menu_layout";
          description { state: "show" 0.0;
             color: 0 0 0 175;
          }
+         description { state: "anim" 0.0;
+            color: 0 0 0 200;
+         }
       }
       part { name: "clipper";
          type: RECT;
@@ -820,7 +794,7 @@ group { name: "menu_layout";
                font: FN;
                text: "Enventor Menu";
                size: 28;
-               align: 0.5 1;
+               align: 0.5 0.5;
                min: 1 0;
             }
             color: 51 153 255 255;
@@ -849,8 +823,9 @@ group { name: "menu_layout";
             rel1.to: "padding1";
             rel2.to: "padding1";
             rel1.relative: 1 0;
-            align: 0 0.5;
+            align: 0 0;
             min: 80 80;
+            max: 80 80;
             fixed: 1 1;
          }
       }
@@ -1030,6 +1005,19 @@ group { name: "menu_layout";
          source: "";
          action: STATE_SET "hide" 0.0;
          target: "event_blocker";
+         after: "bg_anim";
+      }
+      program { name: "bg_anim";
+         action: STATE_SET "anim" 0.0;
+         transition: "DECELERATE" 2;
+         target: "bg";
+         after: "bg_anim2";
+      }
+      program { name: "bg_anim2";
+         action: STATE_SET "show" 0.0;
+         transition: "DECELERATE" 2;
+         target: "bg";
+         after: "bg_anim";
       }
       program { name: "dismiss";
          signal: "elm,state,dismiss";
diff --git a/src/bin/menu.c b/src/bin/menu.c
index 1bafb16..3848fc3 100644
--- a/src/bin/menu.c
+++ b/src/bin/menu.c
@@ -331,29 +331,16 @@ prev_btn_cb(void *data, Evas_Object *obj EINA_UNUSED,
 static Evas_Object *
 btn_create(Evas_Object *parent, const char *label, Evas_Smart_Cb cb, void 
*data)
 {
-   Evas_Object *layout, *btn;
-
-   layout = elm_layout_add(parent);
-   elm_layout_file_set(layout, EDJE_PATH, "button_layout");
-   evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
-   evas_object_show(layout);
+   Evas_Object *btn;
 
-   btn  = elm_button_add(layout);
+   btn  = elm_button_add(parent);
+   elm_object_style_set(btn, "anchor");
+   elm_object_scale_set(btn, 1.45);
    evas_object_smart_callback_add(btn, "clicked", cb, data);
    elm_object_text_set(btn, label);
    evas_object_show(btn);
 
-   elm_object_part_content_set(layout, "elm.swallow.btn", btn);
-
-   return layout;
-}
-
-static Eina_Bool
-btn_effect_timer_cb(void *data)
-{
-   Evas_Object *btn = data;
-   elm_object_signal_emit(btn, "elm,action,btn,zoom", "");
-   return ECORE_CALLBACK_CANCEL;
+   return btn;
 }
 
 static void
@@ -630,32 +617,26 @@ menu_open(menu_data *md)
    btn = btn_create(layout, "New", new_btn_cb, md);
    elm_object_focus_set(btn, EINA_TRUE);
    elm_object_part_content_set(layout, "elm.swallow.new_btn", btn);
-   ecore_timer_add(0, btn_effect_timer_cb, btn);
 
    //Button(Save)
    btn = btn_create(layout, "Save", save_btn_cb, md);
    elm_object_part_content_set(layout, "elm.swallow.save_btn", btn);
-   ecore_timer_add(0.03, btn_effect_timer_cb, btn);
 
    //Button(Load)
    btn = btn_create(layout, "Load", load_btn_cb, md);
    elm_object_part_content_set(layout, "elm.swallow.load_btn", btn);
-   ecore_timer_add(0.06, btn_effect_timer_cb, btn);
 
    //Button(Setting)
    btn = btn_create(layout, "Setting", setting_btn_cb, md);
    elm_object_part_content_set(layout, "elm.swallow.setting_btn", btn);
-   ecore_timer_add(0.09, btn_effect_timer_cb, btn);
 
    //Button(About)
    btn = btn_create(layout, "About", about_btn_cb, md);
    elm_object_part_content_set(layout, "elm.swallow.about_btn", btn);
-   ecore_timer_add(0.12, btn_effect_timer_cb, btn);
 
    //Button(Exit)
    btn = btn_create(layout, "Exit", exit_btn_cb, md);
    elm_object_part_content_set(layout, "elm.swallow.exit_btn", btn);
-   ecore_timer_add(0.15, btn_effect_timer_cb, btn);
 
    //Button(Prev)
    btn = elm_button_add(layout);

-- 


Reply via email to