[Task-mgr] Fixed scale and long size name issues
authormoon87.park <moon87.park@samsung.com>
Mon, 22 Feb 2016 08:27:29 +0000 (17:27 +0900)
committermoon87.park <moon87.park@samsung.com>
Mon, 22 Feb 2016 10:18:27 +0000 (19:18 +0900)
Change-Id: I5b9c30daae3e5ebe13af7fdf2f1b06074936c3f3

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

index ad6bb97..f876075 100644 (file)
 #define __TASK_MGR_CONF_H__
 
 //size
-#define BASE_WIDTH 540
-#define BASE_HEIGHT 960
+#define BASE_WIDTH 720
+#define BASE_HEIGHT 1280
 
 #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
+#define CLEAR_ITEM_HEIGHT CLEAR_LINE_HEIGHT+CLEAR_PAD_HEIGHT
 
-#define ITEM_ICON_WIDTH 88
-#define ITEM_ICON_HEIGHT 88
+#define ITEM_ICON_WIDTH 118
+#define ITEM_ICON_HEIGHT 118
 #define ITEM_LINE_WIDTH 2
-#define ITEM_LINE_HEIGHT 148
+#define ITEM_LINE_HEIGHT 174
 #define ITEM_WIDTH ITEM_ICON_WIDTH
 #define ITEM_HEIGHT ITEM_LINE_HEIGHT
 
@@ -47,5 +48,6 @@
 #define ITEM_LAYOUT EDJEDIR"/item.edj"
 
 #define BOX_GROUP_NAME "box"
+#define BG_PART_NAME "bg"
 
 #endif //__TASK_MGR_CONF_H__
index 463cc32..a7ba730 100644 (file)
@@ -21,8 +21,9 @@
 #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 6520e59..004d8ea 100644 (file)
@@ -8,11 +8,11 @@ Release:      1
 License:       Apache-2.0
 Source0:       %{name}-%{version}.tar.gz
 
-%if "%{?tizen_profile_name}" == "wearable"
+%if "%{?profile}" == "wearable"
 ExcludeArch: %{arm} %ix86 x86_64
 %endif
 
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?profile}" == "tv"
 ExcludeArch: %{arm} %ix86 x86_64
 %endif
 
index 26955b0..62354db 100644 (file)
@@ -7,14 +7,6 @@ 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
deleted file mode 100644 (file)
index a2796f9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  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 4ae774f..1ad16dd 100644 (file)
@@ -24,7 +24,7 @@
 styles {
        style {
                name: "item_style";
-               base: "font=Tizen:style=Bold font_size=30 color=#ffffff align=left style=shadow shadow_color=#000000bf wrap=mixed";
+               base: "font=Tizen:style=Bold font_size=32 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,8 +37,19 @@ images {
        image: "clear_all_button_icon_disable.png" COMP;
 }
 
+externals {
+       external: "feedback";
+}
+
 collections {
-       base_scale: 2.1;
+       base_scale: 2.6;
+       plugins {
+               plugin {
+                       name: "touch_sound";
+                       source: "feedback";
+                       param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
+               }
+       }
        group {
                name: "item";
                parts {
@@ -58,6 +69,7 @@ collections {
                        part{
                                name: "line";
                                type: RECT;
+                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        color: 255 255 255 255;
@@ -78,17 +90,7 @@ collections {
                                        rel1.relative: 0.0 0.0;
                                        rel2.relative: 1.0 1.0;
                                        visible: 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;
+                                       fixed: 1 1;
                                }
                        }
                }
@@ -112,6 +114,7 @@ collections {
                        part {
                                name: "icon";
                                type: SWALLOW;
+                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        rel1 { relative: 0.5 0.0; to: "bg"; }
@@ -125,21 +128,41 @@ 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"; }
+                                       rel2 { relative: 1.0 1.0; to: "icon"; offset: 220 0; }
                                        text {
                                                text: "";
                                                style: "item_style";
-                                               min: 1 0;
+                                               min: 0 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 {
@@ -158,13 +181,26 @@ 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; to: "bg"; }
+                                       rel1 { relative: 0.5 0.0; offset: 0 5; to: "clear_img"; }
                                        rel2 { relative: 0.5 1.0; to: "bg"; }
                                        min: CLEAR_LINE_WIDTH 0;
                                        visible: 1;
@@ -178,8 +214,8 @@ collections {
                                scale: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.5 0.0; to: "bg"; }
-                                       rel2 { relative: 0.5 0.0; to: "bg"; }
+                                       rel1 { relative: 0.5 1.0; to: "top_pad"; }
+                                       rel2 { relative: 0.5 1.0; to: "top_pad"; }
                                        image {
                                                normal: "clear_all_button_icon.png";
                                        }
@@ -199,6 +235,7 @@ collections {
                        part {
                                name: "name";
                                type: TEXTBLOCK;
+                               scale: 1;
                                description {
                                        state: "default" 0.0;
                                        color: 255 255 255 255;
@@ -238,10 +275,10 @@ collections {
                } //parts
                programs {
                        program {
-                               name: "event,click";
+                               name: "click,sound";
                                signal: "mouse,clicked,1";
                                source: "event";
-                               action: SIGNAL_EMIT "click" "clear_item";
+                               action: RUN_PLUGIN "touch_sound";
                        }
                        program {
                                name: "no,app";
index 4577cdb..37178c2 100644 (file)
@@ -22,7 +22,7 @@
 styles {
        style {
                name: "no_item_style";
-               base: "font=Tizen:style=Bold font_size=30 color=#ffffff align=center style=shadow shadow_color=#000000bf wrap=mixed";
+               base: "font=Tizen:style=Bold font_size=32 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,20 +31,18 @@ styles {
 }
 
 collections {
-       base_scale: 2.1;
+       base_scale: 2.6;
        group {
                name: "layout";
                parts {
                        part {
                                name: "bg";
-                               type: RECT;
+                               type: SWALLOW;
                                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 b6ef2c2..28f0687 100644 (file)
@@ -47,7 +47,6 @@
 
 #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
 
@@ -83,7 +82,7 @@ static void _clear_all_clicked_cb(void *data, Evas_Object *obj, const char *emis
 {
        Evas_Object *scroller = data;
        ret_if(!scroller);
-       _D("");
+       _D("clear all item is clicked");
        scroller_pop_all_item(scroller, 1);
 }
 
@@ -106,7 +105,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, "click", "clear_item", _clear_all_clicked_cb, scroller);
+       elm_object_signal_callback_add(clear_item, "mouse,clicked,1", "event", _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);
@@ -282,7 +281,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, item_outer_w, item_outer_h);
+       evas_object_size_hint_min_set(item_outer, ELM_SCALE_SIZE(item_outer_w), ELM_SCALE_SIZE(item_outer_h));
        evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_H, (void *)item_outer_h);
 
        if (item_outer_h <= 0) {
@@ -543,9 +542,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 = item_size * PRIVATE_ITEM_TERMINATE_THRESHOLD;
+       tm_threshold = main_get_info()->root_w - 100;
 
-       if (abs(item_pos - init_pos) > tm_threshold || (up_time - down_time < PRIVATE_FLICK_TIME && abs(item_pos - init_pos) > 0)) {
+       if (item_pos > tm_threshold || item_pos < 10 || (up_time - down_time < PRIVATE_FLICK_TIME && abs(item_pos - init_pos) > 0)) {
                _item_terminate_anim(item_outer);
 
        } else if (item_pos != init_pos) {
@@ -565,7 +564,7 @@ static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 
 
 
-static void _clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
        _D("Clicked");
 
@@ -586,6 +585,8 @@ static void _clicked_cb(void *data, Evas_Object *obj, void *event_info)
        appid = info->appid;
        ret_if(!appid);
 
+       elm_object_signal_emit(item_inner, "clicked", "event");
+
        util_launch_app(appid);
        //layout_hide_with_timer();
 }
@@ -597,7 +598,6 @@ 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,11 +626,7 @@ 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);
 
-       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);
+       elm_object_signal_callback_add(item_inner, "mouse,clicked,1", "event", _clicked_cb, item);
 
        evas_object_data_set(item, DATA_KEY_ITEM_INFO, info);
 
@@ -647,15 +643,9 @@ 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");
@@ -697,8 +687,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 ba76a5b..60db504 100644 (file)
@@ -77,6 +77,7 @@ 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
@@ -93,6 +94,15 @@ 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);
@@ -109,7 +119,13 @@ 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;
        }
@@ -163,16 +179,17 @@ 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);
@@ -212,7 +229,7 @@ static void _terminate_cb(void *data)
        malloc_trim(0);
        appcore_flush_memory();
 
-       scroller_destroy(main_info.layout);
+       scroller_destroy(main_info.scroller);
        _destroy_layout();
 
        /**
index c6fbb64..045b5e6 100644 (file)
@@ -43,13 +43,19 @@ 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);
 
-       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
+       list = elm_box_children_get(box_layout);
+       retv_if(!list, TASK_MGR_ERROR_FAIL);
+
+       box = eina_list_nth(list, 0);
        retv_if(!box, TASK_MGR_ERROR_FAIL);
 
+       eina_list_free(list);
+
        elm_box_pack_end(box, item);
 
        return TASK_MGR_ERROR_NONE;
@@ -64,30 +70,25 @@ 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 = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
+       box_list = elm_box_children_get(box_layout);
+       ret_if(!box_list);
+
+       box = eina_list_nth(box_list, 0);
        ret_if(!box);
 
-       list = elm_box_children_get(box);
-       ret_if(!list);
+       eina_list_free(box_list);
 
-       EINA_LIST_FOREACH_SAFE(list, l, ln, tmp_item) {
-               if (item != tmp_item) continue;
-               if (terminate) item_terminate(item);
+       if (terminate) item_terminate(item);
 
-               elm_box_unpack(box, item);
-               item_destroy(item);
-               break;
-       }
-       eina_list_free(list);
+       elm_box_unpack(box, item);
+       item_destroy(item);
 }
 
 
@@ -156,6 +157,7 @@ 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;
@@ -165,7 +167,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.");
-               ecore_timer_del(timer);
+               return;
        }
 
        /* An user tap the end all button, all items have to be terminated even if paused. */
@@ -176,9 +178,14 @@ extern void scroller_pop_all_item(Evas_Object *scroller, int terminate)
        box_layout = elm_object_content_get(scroller);
        ret_if(!box_layout);
 
-       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
+       box_list = elm_box_children_get(box_layout);
+       ret_if(!box_list);
+
+       box = eina_list_nth(box_list, 0);
        ret_if(!box);
 
+       eina_list_free(box_list);
+
        list = elm_box_children_get(box);
        if (!list) return;
 
@@ -206,6 +213,7 @@ 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);
@@ -213,9 +221,14 @@ extern int scroller_count(Evas_Object *scroller)
        box_layout = elm_object_content_get(scroller);
        retv_if(!box_layout, 0);
 
-       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
+       box_list = elm_box_children_get(box_layout);
+       retv_if(!box_list, 0);
+
+       box = eina_list_nth(box_list, 0);
        retv_if(!box, 0);
 
+       eina_list_free(box_list);
+
        list = elm_box_children_get(box);
        if (!list) {
                _D("list is null");
@@ -238,15 +251,21 @@ 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);
 
-       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
+       list = elm_box_children_get(box_layout);
+       ret_if(!list);
+
+       box = eina_list_nth(list, 0);
        ret_if(!box);
 
+       eina_list_free(list);
+
        elm_object_scroll_freeze_push(box);
 }
 
@@ -256,15 +275,21 @@ 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);
 
-       box = elm_object_part_content_get(box_layout, BOX_GROUP_NAME);
+       list = elm_box_children_get(box_layout);
+       ret_if(!list);
+
+       box = eina_list_nth(list, 0);
        ret_if(!box);
 
+       eina_list_free(list);
+
        while (elm_object_scroll_freeze_get(box)) {
                elm_object_scroll_freeze_pop(box);
        }
@@ -330,12 +355,27 @@ 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);
@@ -343,10 +383,11 @@ 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, "list_effect");
-       elm_object_focus_allow_set(scroller, EINA_FALSE);
+       elm_object_style_set(scroller, "effect");
+
        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);
@@ -355,19 +396,20 @@ 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. */
 
-       box_layout = elm_layout_add(scroller);
+       /* Because change an align in box, use the another box betweein box and scroller. */
+       box_layout = elm_box_add(scroller);
        if (!box_layout) {
                _E("Fail to create box layout");
                evas_object_del(scroller);
                return NULL;
        }
-       elm_layout_file_set(box_layout, BOX_LAYOUT, BOX_GROUP_NAME);
+       elm_box_horizontal_set(box_layout, EINA_FALSE);
+       elm_box_align_set(box_layout, 0.5, 1.0);
        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);
-       evas_object_show(box_layout);
        elm_object_content_set(scroller, box_layout);
+       evas_object_show(box_layout);
 
        box = elm_box_add(scroller);
        if (!box) {
@@ -377,12 +419,17 @@ 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_object_part_content_set(box_layout, BOX_GROUP_NAME, box);
+       elm_box_pack_end(box_layout, 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;
 }
 
@@ -395,16 +442,21 @@ 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_unset(scroller);
+       box_layout = elm_object_content_get(scroller);
        ret_if(!box_layout);
 
-       box = elm_object_part_content_unset(box_layout, BOX_GROUP_NAME);
+       box_list = elm_box_children_get(box_layout);
+       ret_if(!box_list);
+
+       box = eina_list_nth(box_list, 0);
        ret_if(!box);
+       eina_list_free(box_list);
 
        list = elm_box_children_get(box);
        if (!list) {
@@ -414,9 +466,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);