Revert "[Task-mgr] Fixed scale and long size name issues"
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 7 Apr 2016 08:56:34 +0000 (10:56 +0200)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 7 Apr 2016 08:56:38 +0000 (10:56 +0200)
This reverts commit 5abb8bbd171f613937db73b0bfba98e3ca97bf3a.

Change-Id: I58d7fabbef23c8fe277958b8d149192baf2f6de9

include/conf.h
include/main.h
packaging/org.tizen.task-mgr.spec
res/edje/CMakeLists.txt
res/edje/box.edc [new file with mode: 0644]
res/edje/item.edc
res/edje/layout.edc
src/item.c
src/main.c
src/scroller.c

index f876075..ad6bb97 100644 (file)
 #define __TASK_MGR_CONF_H__
 
 //size
-#define BASE_WIDTH 720
-#define BASE_HEIGHT 1280
+#define BASE_WIDTH 540
+#define BASE_HEIGHT 960
 
 #define CLEAR_ICON_WIDTH 60
 #define CLEAR_ICON_HEIGHT 60
 #define CLEAR_LINE_WIDTH 2
 #define CLEAR_LINE_HEIGHT 120
-#define CLEAR_PAD_HEIGHT 100
 #define CLEAR_ITEM_WIDTH CLEAR_ICON_WIDTH
-#define CLEAR_ITEM_HEIGHT CLEAR_LINE_HEIGHT+CLEAR_PAD_HEIGHT
+#define CLEAR_ITEM_HEIGHT CLEAR_LINE_HEIGHT
 
-#define ITEM_ICON_WIDTH 118
-#define ITEM_ICON_HEIGHT 118
+#define ITEM_ICON_WIDTH 88
+#define ITEM_ICON_HEIGHT 88
 #define ITEM_LINE_WIDTH 2
-#define ITEM_LINE_HEIGHT 174
+#define ITEM_LINE_HEIGHT 148
 #define ITEM_WIDTH ITEM_ICON_WIDTH
 #define ITEM_HEIGHT ITEM_LINE_HEIGHT
 
@@ -48,6 +47,5 @@
 #define ITEM_LAYOUT EDJEDIR"/item.edj"
 
 #define BOX_GROUP_NAME "box"
-#define BG_PART_NAME "bg"
 
 #endif //__TASK_MGR_CONF_H__
index a7ba730..463cc32 100644 (file)
@@ -21,9 +21,8 @@
 #define __TASK_MGR_H__
 
 typedef struct {
-       Evas *e;
+       Evas            *e;
        Evas_Object *win;
-       Evas_Object *bg;
        Evas_Object *layout;
        Evas_Object *scroller;
        Evas_Object *box;
index 004d8ea..6520e59 100644 (file)
@@ -8,11 +8,11 @@ Release:      1
 License:       Apache-2.0
 Source0:       %{name}-%{version}.tar.gz
 
-%if "%{?profile}" == "wearable"
+%if "%{?tizen_profile_name}" == "wearable"
 ExcludeArch: %{arm} %ix86 x86_64
 %endif
 
-%if "%{?profile}" == "tv"
+%if "%{?tizen_profile_name}" == "tv"
 ExcludeArch: %{arm} %ix86 x86_64
 %endif
 
index 62354db..26955b0 100644 (file)
@@ -7,6 +7,14 @@ ADD_CUSTOM_TARGET(layout.edj
 ADD_DEPENDENCIES(${PROJECT_NAME} layout.edj)
 INSTALL(FILES layout.edj DESTINATION ${EDJEDIR})
 
+ADD_CUSTOM_TARGET(box.edj
+                COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images
+                ${CMAKE_CURRENT_SOURCE_DIR}/box.edc box.edj
+                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/box.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} box.edj)
+INSTALL(FILES box.edj DESTINATION ${EDJEDIR})
+
 ADD_CUSTOM_TARGET(item.edj
                 COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images
                 ${CMAKE_CURRENT_SOURCE_DIR}/item.edc item.edj
diff --git a/res/edje/box.edc b/res/edje/box.edc
new file mode 100644 (file)
index 0000000..a2796f9
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ *  Task Manager
+ *
+ * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+#include "conf.h"
+
+collections {
+       base_scale: 2.1;
+       group {
+               name: "box";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                                       min: BASE_WIDTH BASE_HEIGHT;
+                                       color: 0 0 0 0;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "box";
+                               type: SWALLOW;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 1.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                                       align: 0.5 1.0;
+                                       fixed: 0 1;
+                                       visible: 1;
+                               }
+                       }
+               } //parts
+       } //group
+} //collections
index 1ad16dd..4ae774f 100644 (file)
@@ -24,7 +24,7 @@
 styles {
        style {
                name: "item_style";
-               base: "font=Tizen:style=Bold font_size=32 color=#ffffff align=left style=shadow shadow_color=#000000bf wrap=mixed";
+               base: "font=Tizen:style=Bold font_size=30 color=#ffffff align=left style=shadow shadow_color=#000000bf wrap=mixed";
                tag:  "br" "\n";
                tag:  "hilight" "+ font_weight=Bold";
                tag:  "b" "+ font_weight=Bold";
@@ -37,19 +37,8 @@ images {
        image: "clear_all_button_icon_disable.png" COMP;
 }
 
-externals {
-       external: "feedback";
-}
-
 collections {
-       base_scale: 2.6;
-       plugins {
-               plugin {
-                       name: "touch_sound";
-                       source: "feedback";
-                       param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
-               }
-       }
+       base_scale: 2.1;
        group {
                name: "item";
                parts {
@@ -69,7 +58,6 @@ collections {
                        part{
                                name: "line";
                                type: RECT;
-                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        color: 255 255 255 255;
@@ -90,7 +78,17 @@ collections {
                                        rel1.relative: 0.0 0.0;
                                        rel2.relative: 1.0 1.0;
                                        visible: 1;
-                                       fixed: 1 1;
+                               }
+                       }
+                       part {
+                               name: "focus";
+                               type: SWALLOW;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; to: "bg"; }
+                                       rel2 { relative: 1.0 1.0; to: "bg"; }
+                                       visible: 1;
                                }
                        }
                }
@@ -114,7 +112,6 @@ collections {
                        part {
                                name: "icon";
                                type: SWALLOW;
-                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        rel1 { relative: 0.5 0.0; to: "bg"; }
@@ -128,41 +125,21 @@ collections {
                        part {
                                name: "name";
                                type: TEXTBLOCK;
-                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        color: 255 255 255 255;
                                        rel1 { relative: 1.0 0.0; to: "icon"; offset: 20 0; }
-                                       rel2 { relative: 1.0 1.0; to: "icon"; offset: 220 0; }
+                                       rel2 { relative: 1.0 1.0; to: "icon"; }
                                        text {
                                                text: "";
                                                style: "item_style";
-                                               min: 0 0;
+                                               min: 1 0;
                                        }
                                        align: 0.0 0.5;
                                        visible: 1;
                                }
                        }
-                       part {
-                               name: "event";
-                               type: RECT;
-                               description {
-                                       state: "default" 0.0;
-                                       color: 0 0 0 0;
-                                       rel1 { relative: 0.0 0.0; to: "icon"; }
-                                       rel2 { relative: 1.0 1.0; to: "icon"; }
-                                       visible: 1;
-                               }
-                       }
                } //parts
-               programs {
-                       program {
-                               name: "click,sound";
-                               signal: "clicked";
-                               source: "event";
-                               action: RUN_PLUGIN "touch_sound";
-                       }
-               } //programs
        } //group
 
        group {
@@ -181,26 +158,13 @@ collections {
                                        visible: 1;
                                }
                        }
-                       part {
-                               name: "top_pad";
-                               type: SPACER;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; to: "bg"; }
-                                       rel2 { relative: 1.0 0.0; to: "bg"; }
-                                       min: 0 CLEAR_PAD_HEIGHT;
-                                       align: 0.5 0.0;
-                               }
-                       }
                        part{
                                name: "line";
                                type: RECT;
-                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        color: 255 255 255 255;
-                                       rel1 { relative: 0.5 0.0; offset: 0 5; to: "clear_img"; }
+                                       rel1 { relative: 0.5 0.0; to: "bg"; }
                                        rel2 { relative: 0.5 1.0; to: "bg"; }
                                        min: CLEAR_LINE_WIDTH 0;
                                        visible: 1;
@@ -214,8 +178,8 @@ collections {
                                scale: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.5 1.0; to: "top_pad"; }
-                                       rel2 { relative: 0.5 1.0; to: "top_pad"; }
+                                       rel1 { relative: 0.5 0.0; to: "bg"; }
+                                       rel2 { relative: 0.5 0.0; to: "bg"; }
                                        image {
                                                normal: "clear_all_button_icon.png";
                                        }
@@ -235,7 +199,6 @@ collections {
                        part {
                                name: "name";
                                type: TEXTBLOCK;
-                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        color: 255 255 255 255;
@@ -275,10 +238,10 @@ collections {
                } //parts
                programs {
                        program {
-                               name: "click,sound";
+                               name: "event,click";
                                signal: "mouse,clicked,1";
                                source: "event";
-                               action: RUN_PLUGIN "touch_sound";
+                               action: SIGNAL_EMIT "click" "clear_item";
                        }
                        program {
                                name: "no,app";
index 37178c2..4577cdb 100644 (file)
@@ -22,7 +22,7 @@
 styles {
        style {
                name: "no_item_style";
-               base: "font=Tizen:style=Bold font_size=32 color=#ffffff align=center style=shadow shadow_color=#000000bf wrap=mixed";
+               base: "font=Tizen:style=Bold font_size=30 color=#ffffff align=center style=shadow shadow_color=#000000bf wrap=mixed";
                tag:  "br" "\n";
                tag:  "hilight" "+ font_weight=Bold";
                tag:  "b" "+ font_weight=Bold";
@@ -31,18 +31,20 @@ styles {
 }
 
 collections {
-       base_scale: 2.6;
+       base_scale: 2.1;
        group {
                name: "layout";
                parts {
                        part {
                                name: "bg";
-                               type: SWALLOW;
+                               type: RECT;
                                scale: 1;
                                description {
                                        state: "default" 0.0;
+                                       color: 0 0 0 BG_COLOR;
                                        rel1 { relative: 0.0 0.0; }
                                        rel2 { relative: 1.0 1.0; }
+                                       min: BASE_WIDTH BASE_HEIGHT;
                                        visible: 1;
                                }
                        }
index 28f0687..b6ef2c2 100644 (file)
@@ -47,6 +47,7 @@
 
 #define PRIVATE_MOVE_THRESHOLD 30
 #define PRIVATE_FLICK_TIME 100
+#define PRIVATE_ITEM_TERMINATE_THRESHOLD 2.0
 #define PRIVATE_ITEM_ALPHA 0.8
 #define PRIVATE_ITEM_ALPHA_MAX 100
 
@@ -82,7 +83,7 @@ static void _clear_all_clicked_cb(void *data, Evas_Object *obj, const char *emis
 {
        Evas_Object *scroller = data;
        ret_if(!scroller);
-       _D("clear all item is clicked");
+       _D("");
        scroller_pop_all_item(scroller, 1);
 }
 
@@ -105,7 +106,7 @@ extern Evas_Object *item_clear_all_create(Evas_Object *scroller)
 
        elm_object_part_text_set(clear_item, "name", _("IDS_TASKMGR_BUTTON_CLEAR_ALL"));
 
-       elm_object_signal_callback_add(clear_item, "mouse,clicked,1", "event", _clear_all_clicked_cb, scroller);
+       elm_object_signal_callback_add(clear_item, "click", "clear_item", _clear_all_clicked_cb, scroller);
        evas_object_data_set(scroller, PRIVATE_DATA_KEY_CLEAR, clear_item);
 
        evas_object_size_hint_weight_set(clear_item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -281,7 +282,7 @@ static Eina_Bool _anim_slipped_item(void *data)
        item_outer_h = (int)evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_H);
 
        item_outer_h -= SLIPPED_LENGTH;
-       evas_object_size_hint_min_set(item_outer, ELM_SCALE_SIZE(item_outer_w), ELM_SCALE_SIZE(item_outer_h));
+       evas_object_size_hint_min_set(item_outer, item_outer_w, item_outer_h);
        evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_H, (void *)item_outer_h);
 
        if (item_outer_h <= 0) {
@@ -542,9 +543,9 @@ static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
        init_pos = (int) evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_X);
        evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_Y);
        evas_object_geometry_get(item_inner, &item_pos, NULL, &item_size, NULL);
-       tm_threshold = main_get_info()->root_w - 100;
+       tm_threshold = item_size * PRIVATE_ITEM_TERMINATE_THRESHOLD;
 
-       if (item_pos > tm_threshold || item_pos < 10 || (up_time - down_time < PRIVATE_FLICK_TIME && abs(item_pos - init_pos) > 0)) {
+       if (abs(item_pos - init_pos) > tm_threshold || (up_time - down_time < PRIVATE_FLICK_TIME && abs(item_pos - init_pos) > 0)) {
                _item_terminate_anim(item_outer);
 
        } else if (item_pos != init_pos) {
@@ -564,7 +565,7 @@ static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 
 
 
-static void _clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void _clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        _D("Clicked");
 
@@ -585,8 +586,6 @@ static void _clicked_cb(void *data, Evas_Object *obj, const char *emission, cons
        appid = info->appid;
        ret_if(!appid);
 
-       elm_object_signal_emit(item_inner, "clicked", "event");
-
        util_launch_app(appid);
        //layout_hide_with_timer();
 }
@@ -598,6 +597,7 @@ extern Evas_Object *item_create(Evas_Object *scroller, list_type_default_s *info
        retv_if(NULL == scroller, NULL);
        retv_if(NULL == info, NULL);
 
+       Evas_Object *focus = NULL;
        Evas_Object *icon = NULL;
        Evas_Object *item = NULL;
        Evas_Object *item_inner = NULL;
@@ -626,7 +626,11 @@ extern Evas_Object *item_create(Evas_Object *scroller, list_type_default_s *info
        elm_object_part_content_set(item_inner, "icon", icon);
        elm_object_part_text_set(item_inner, "name", info->name);
 
-       elm_object_signal_callback_add(item_inner, "mouse,clicked,1", "event", _clicked_cb, item);
+       focus = elm_button_add(scroller);
+       goto_if(NULL == focus, ERROR);
+       elm_object_style_set(focus, "focus");
+       elm_object_part_content_set(item, "focus", focus);
+       evas_object_smart_callback_add(focus, "clicked", _clicked_cb, item);
 
        evas_object_data_set(item, DATA_KEY_ITEM_INFO, info);
 
@@ -643,9 +647,15 @@ extern void item_destroy(Evas_Object *item)
 {
        ret_if(!item);
 
+       Evas_Object *focus = NULL;
        Evas_Object *icon = NULL;
        Evas_Object *item_inner = NULL;
 
+       focus = elm_object_part_content_unset(item, "focus");
+       if (focus) {
+               evas_object_del(focus);
+       }
+
        item_inner = elm_object_part_content_unset(item, "inner");
        if (!item_inner) {
                _E("cannot get the object");
@@ -687,8 +697,8 @@ extern void item_terminate(Evas_Object *item)
                util_kill_app(appid);
        }
 
-       if (0 != rua_delete_history_with_pkgname(appid)) {
-               _E("Cannot delete history for package(%s)", appid);
+       if (0 != rua_delete_history_with_pkgname(appid)) {              
+               _E("Cannot delete history for package(%s)", appid);             
        }
 }
 
index 60db504..ba76a5b 100644 (file)
@@ -77,7 +77,6 @@ static task_mgr_error_e _create_layout(Evas_Object *parent)
 {
        _D("");
        Evas_Object *layout = NULL;
-       Evas_Object *rect = NULL;
        Eina_Bool ret = EINA_FALSE;
 
        // create layout
@@ -94,15 +93,6 @@ static task_mgr_error_e _create_layout(Evas_Object *parent)
 
        main_info.layout = layout;
 
-       // create layout bg
-       rect = evas_object_rectangle_add(evas_object_evas_get(layout));
-       evas_object_size_hint_min_set(rect, main_info.root_w, main_info.root_h);
-       evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_resize(rect, main_info.root_w, main_info.root_h);
-       evas_object_color_set(rect, 0, 0, 0, BG_COLOR);
-       evas_object_show(rect);
-       elm_object_part_content_set(layout, BG_PART_NAME, rect);
-
        // create scroller
        main_info.scroller = scroller_create(layout);
        goto_if(!main_info.scroller, ERROR);
@@ -119,13 +109,7 @@ ERROR:
 
 static void _destroy_layout(void)
 {
-       Evas_Object *rect = NULL;
-
        if (main_info.layout) {
-               rect = elm_object_part_content_unset(main_info.layout, BG_PART_NAME);
-               if (rect) {
-                       evas_object_del(rect);
-               }
                evas_object_del(main_info.layout);
                main_info.layout = NULL;
        }
@@ -179,17 +163,16 @@ static bool _create_cb(void *data)
        main_info.win = elm_win_add(NULL, "Task-mgr", ELM_WIN_BASIC);
        retv_if(!main_info.win, false);
 
-       elm_app_base_scale_set(2.6);
        elm_win_screen_size_get(main_info.win, NULL, NULL, &main_info.root_w, &main_info.root_h);
        _D("screen size is (%d, %d)", main_info.root_w, main_info.root_h);
 
        elm_object_event_callback_add(main_info.win, _back_key_pressed, NULL);
 
-       elm_win_alpha_set(main_info.win, EINA_TRUE);
        elm_win_indicator_mode_set(main_info.win, ELM_WIN_INDICATOR_SHOW);
        elm_win_indicator_opacity_set(main_info.win, ELM_WIN_INDICATOR_TRANSPARENT);
 
        elm_win_borderless_set(main_info.win, EINA_TRUE);
+       elm_win_alpha_set(main_info.win, EINA_TRUE);
        evas_object_show(main_info.win);
 
        main_info.e = evas_object_evas_get(main_info.win);
@@ -229,7 +212,7 @@ static void _terminate_cb(void *data)
        malloc_trim(0);
        appcore_flush_memory();
 
-       scroller_destroy(main_info.scroller);
+       scroller_destroy(main_info.layout);
        _destroy_layout();
 
        /**
index 045b5e6..c6fbb64 100644 (file)
@@ -43,19 +43,13 @@ extern task_mgr_error_e scroller_push_item(Evas_Object *scroller, Evas_Object *i
 
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
-       Eina_List *list = NULL;
 
        box_layout = elm_object_content_get(scroller);
        retv_if(!box_layout, TASK_MGR_ERROR_FAIL);
 
-       list = elm_box_children_get(box_layout);
-       retv_if(!list, TASK_MGR_ERROR_FAIL);
-
-       box = eina_list_nth(list, 0);
+       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
        retv_if(!box, TASK_MGR_ERROR_FAIL);
 
-       eina_list_free(list);
-
        elm_box_pack_end(box, item);
 
        return TASK_MGR_ERROR_NONE;
@@ -70,25 +64,30 @@ extern void scroller_pop_item(Evas_Object *scroller, Evas_Object *item, int term
 
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
+       Evas_Object *tmp_item = NULL;
 
-       Eina_List *box_list = NULL;
        Eina_List *list = NULL;
+       const Eina_List *l = NULL;
+       const Eina_List *ln = NULL;
 
        box_layout = elm_object_content_get(scroller);
        ret_if(!box_layout);
 
-       box_list = elm_box_children_get(box_layout);
-       ret_if(!box_list);
-
-       box = eina_list_nth(box_list, 0);
+       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
        ret_if(!box);
 
-       eina_list_free(box_list);
+       list = elm_box_children_get(box);
+       ret_if(!list);
 
-       if (terminate) item_terminate(item);
+       EINA_LIST_FOREACH_SAFE(list, l, ln, tmp_item) {
+               if (item != tmp_item) continue;
+               if (terminate) item_terminate(item);
 
-       elm_box_unpack(box, item);
-       item_destroy(item);
+               elm_box_unpack(box, item);
+               item_destroy(item);
+               break;
+       }
+       eina_list_free(list);
 }
 
 
@@ -157,7 +156,6 @@ extern void scroller_pop_all_item(Evas_Object *scroller, int terminate)
 {
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
-       Eina_List *box_list = NULL;
        Eina_List *list = NULL;
        Eina_List *reverse_list = NULL;
        Ecore_Timer *timer = NULL;
@@ -167,7 +165,7 @@ extern void scroller_pop_all_item(Evas_Object *scroller, int terminate)
        timer = evas_object_data_del(scroller, PRIVATE_DATA_KEY_POP_ALL_TIMER);
        if (timer) {
                _D("There is already a timer for popping all items.");
-               return;
+               ecore_timer_del(timer);
        }
 
        /* An user tap the end all button, all items have to be terminated even if paused. */
@@ -178,14 +176,9 @@ extern void scroller_pop_all_item(Evas_Object *scroller, int terminate)
        box_layout = elm_object_content_get(scroller);
        ret_if(!box_layout);
 
-       box_list = elm_box_children_get(box_layout);
-       ret_if(!box_list);
-
-       box = eina_list_nth(box_list, 0);
+       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
        ret_if(!box);
 
-       eina_list_free(box_list);
-
        list = elm_box_children_get(box);
        if (!list) return;
 
@@ -213,7 +206,6 @@ extern int scroller_count(Evas_Object *scroller)
 {
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
-       Eina_List *box_list = NULL;
        Eina_List *list = NULL;
 
        retv_if(!scroller, 0);
@@ -221,14 +213,9 @@ extern int scroller_count(Evas_Object *scroller)
        box_layout = elm_object_content_get(scroller);
        retv_if(!box_layout, 0);
 
-       box_list = elm_box_children_get(box_layout);
-       retv_if(!box_list, 0);
-
-       box = eina_list_nth(box_list, 0);
+       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
        retv_if(!box, 0);
 
-       eina_list_free(box_list);
-
        list = elm_box_children_get(box);
        if (!list) {
                _D("list is null");
@@ -251,21 +238,15 @@ extern void scroller_freeze(Evas_Object *scroller)
 {
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
-       Eina_List *list = NULL;
 
        ret_if(!scroller);
 
        box_layout = elm_object_content_get(scroller);
        ret_if(!box_layout);
 
-       list = elm_box_children_get(box_layout);
-       ret_if(!list);
-
-       box = eina_list_nth(list, 0);
+       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
        ret_if(!box);
 
-       eina_list_free(list);
-
        elm_object_scroll_freeze_push(box);
 }
 
@@ -275,21 +256,15 @@ extern void scroller_unfreeze(Evas_Object *scroller)
 {
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
-       Eina_List *list = NULL;
 
        ret_if(!scroller);
 
        box_layout = elm_object_content_get(scroller);
        ret_if(!box_layout);
 
-       list = elm_box_children_get(box_layout);
-       ret_if(!list);
-
-       box = eina_list_nth(list, 0);
+       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
        ret_if(!box);
 
-       eina_list_free(list);
-
        while (elm_object_scroll_freeze_get(box)) {
                elm_object_scroll_freeze_pop(box);
        }
@@ -355,27 +330,12 @@ static void _scroll_cb(void *data, Evas_Object *scroller, void *event_info)
 
 
 
-static void __resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       Evas_Object *scroller = obj;
-
-       int x, y, w, h;
-
-       ret_if(!scroller);
-
-       evas_object_geometry_get(scroller, &x, &y, &w, &h);
-       _D("%s resize(%d, %d, %d, %d)", data, x, y, w, h);
-}
-
-
-
 extern Evas_Object *scroller_create(Evas_Object *layout)
 {
        retv_if(!layout, NULL);
 
        Evas_Object *box = NULL;
        Evas_Object *box_layout = NULL;
-       Evas_Object *rect = NULL;
        Evas_Object *scroller = NULL;
 
        scroller = elm_scroller_add(layout);
@@ -383,11 +343,10 @@ extern Evas_Object *scroller_create(Evas_Object *layout)
 
        elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE);
        elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-       elm_object_style_set(scroller, "effect");
-
+       //elm_object_style_set(scroller, "list_effect");
+       elm_object_focus_allow_set(scroller, EINA_FALSE);
        elm_object_part_content_set(layout, "scroller", scroller);
        evas_object_show(scroller);
-       evas_object_size_hint_align_set(scroller, 0.5, 1.0);
 
        evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, NULL);
        evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL);
@@ -396,20 +355,19 @@ extern Evas_Object *scroller_create(Evas_Object *layout)
        evas_object_smart_callback_add(scroller, "scroll,drag,start", _drag_start_cb, NULL);
        evas_object_smart_callback_add(scroller, "scroll,drag,stop", _drag_stop_cb, NULL);
        evas_object_smart_callback_add(scroller, "scroll", _scroll_cb, NULL);
+       /* Because change an align in box, use the layout betweein box and scroller. */
 
-       /* Because change an align in box, use the another box betweein box and scroller. */
-       box_layout = elm_box_add(scroller);
+       box_layout = elm_layout_add(scroller);
        if (!box_layout) {
                _E("Fail to create box layout");
                evas_object_del(scroller);
                return NULL;
        }
-       elm_box_horizontal_set(box_layout, EINA_FALSE);
-       elm_box_align_set(box_layout, 0.5, 1.0);
+       elm_layout_file_set(box_layout, BOX_LAYOUT, BOX_GROUP_NAME);
        evas_object_size_hint_align_set(box_layout, 0.5, 1.0);
        evas_object_size_hint_weight_set(box_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(scroller, box_layout);
        evas_object_show(box_layout);
+       elm_object_content_set(scroller, box_layout);
 
        box = elm_box_add(scroller);
        if (!box) {
@@ -419,17 +377,12 @@ extern Evas_Object *scroller_create(Evas_Object *layout)
                return NULL;
        }
        elm_box_horizontal_set(box, EINA_FALSE);
-       elm_box_align_set(box, 0.5, 1.0);
        evas_object_size_hint_align_set(box, 0.5, 1.0);
        evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_box_pack_end(box_layout, box);
+       elm_object_part_content_set(box_layout, BOX_GROUP_NAME, box);
        evas_object_show(box);
        main_get_info()->box = box;
 
-       evas_object_event_callback_add(scroller, EVAS_CALLBACK_RESIZE, __resize_cb, "scroller");
-       evas_object_event_callback_add(box_layout, EVAS_CALLBACK_RESIZE, __resize_cb, "box_layout");
-       evas_object_event_callback_add(box, EVAS_CALLBACK_RESIZE, __resize_cb, "box");
-
        return scroller;
 }
 
@@ -442,21 +395,16 @@ void scroller_destroy(Evas_Object *scroller)
        Evas_Object *item = NULL;
        Evas_Object *box_layout = NULL;
        Evas_Object *box = NULL;
-       Evas_Object *rect = NULL;
-       Eina_List *box_list = NULL;
        Eina_List *list = NULL;
 
        ret_if(!scroller);
+       scroller_pop_all_item(scroller, 0);
 
-       box_layout = elm_object_content_get(scroller);
+       box_layout = elm_object_content_unset(scroller);
        ret_if(!box_layout);
 
-       box_list = elm_box_children_get(box_layout);
-       ret_if(!box_list);
-
-       box = eina_list_nth(box_list, 0);
+       box = elm_object_part_content_unset(box_layout, BOX_GROUP_NAME);
        ret_if(!box);
-       eina_list_free(box_list);
 
        list = elm_box_children_get(box);
        if (!list) {
@@ -466,9 +414,9 @@ void scroller_destroy(Evas_Object *scroller)
 
        EINA_LIST_FREE(list, item) {
                if (!item) break;
-               elm_box_unpack(box, item);
                item_destroy(item);
        }
+       free(list);
 
        evas_object_del(box);
        evas_object_del(box_layout);