From ebd92af0c2280bf034cd9f1045a6b36acab50b40 Mon Sep 17 00:00:00 2001 From: woochan lee Date: Sun, 27 Mar 2016 00:53:26 -0700 Subject: [PATCH] Revert "Add scroller in conform." This commit delete ui_view layout. It makes crash when transition effect going. need to debug. This reverts commit 3a31631ae233c6b4082fecbfb11b1b22da43ca1a. Change-Id: Ic4e235fe5bd260645c70b940fed61918df8adcef --- src/include/efl/ui_base_viewmgr.h | 22 +++------------------- src/lib/efl/ui_base_viewmgr.cpp | 38 +++++++------------------------------- 2 files changed, 10 insertions(+), 50 deletions(-) diff --git a/src/include/efl/ui_base_viewmgr.h b/src/include/efl/ui_base_viewmgr.h index 30afc61..6ce2640 100644 --- a/src/include/efl/ui_base_viewmgr.h +++ b/src/include/efl/ui_base_viewmgr.h @@ -49,9 +49,8 @@ class ui_base_viewmgr: public viewmgr::ui_iface_viewmgr friend class ui_base_view; private: - Elm_Win *win; //This is acting like a base object of viewmgr. + Elm_Win *win; //This is acting like a base object of viewmgr. Elm_Conformant *conform; //Conformant for viewmgr. - Elm_Scroller *scroller; //Scroller for viewmgr. Elm_Layout *layout; //Viewmgr's base layout. ui_base_key_listener *key_listener; //HW Key Handler such as "BACK" key... ui_view_indicator indicator; //Mode of indicator. @@ -70,29 +69,14 @@ private: bool create_conformant(Elm_Win *win); /** - * @brief Create a Scroller. - * - * @param conform viewmgr's conformant object. this will be parent of layout object. - * - * @note We add a scroller for an exceptional case. If user view content is larger than window, - * then the content will be automatically scrollable by this scroller. - * For instance, if the virtual keypad is enabled in the landscape mode, - * the content area would be smaller than content minimum size. - * We could avoid clipping the content by scroller. - * - * @return @c true success or @c false not. - */ - - bool create_scroller(Elm_Conformant *conform); - /** * @brief Create a base layout. * - * @param scroller viewmgr's scroller object. this will be parent of layout object. + * @param conform viewmgr's conformant object. this will be parent of layout object. * @param style view's transition effect style. * * @return @c true success or @c false not. */ - bool create_base_layout(Elm_Scroller *scroller, const char *style); + bool create_base_layout(Elm_Conformant *conform, const char *style); /** @brief Set the indicator mode. * diff --git a/src/lib/efl/ui_base_viewmgr.cpp b/src/lib/efl/ui_base_viewmgr.cpp index 530be66..fe2e721 100644 --- a/src/lib/efl/ui_base_viewmgr.cpp +++ b/src/lib/efl/ui_base_viewmgr.cpp @@ -22,19 +22,17 @@ using namespace viewmgr; //FIXME: is it correct to define here? #define EDJ_PATH "/usr/share/edje/ui-viewmgr/ui-viewmgr.edj" -bool ui_base_viewmgr::create_base_layout(Elm_Scroller *scroller, const char *style) +bool ui_base_viewmgr::create_base_layout(Elm_Conformant *conform, const char *style) { char buf[128]; - Elm_Layout *layout = elm_layout_add(scroller); + Elm_Layout *layout = elm_layout_add(conform); if (!layout) return false; //FIXME: Is it C programming style? need to change? snprintf(buf, sizeof(buf), "transition/%s", style); //default transition layout elm_layout_file_set(layout, EDJ_PATH, buf); - evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_content_set(scroller, layout); + elm_object_content_set(conform, layout); //Push Finished Event elm_layout_signal_callback_add(layout, "push,finished", "viewmgr", @@ -77,7 +75,7 @@ Elm_Layout *ui_base_viewmgr::set_transition_layout(string transition_style) if (effect_map.size()) effect_layout = effect_map.find(transition_style)->second; //Conformant content change to current effect layout and change to hide prev layout. - Elm_Layout *playout = elm_object_part_content_unset(this->scroller, "elm.swallow.content"); + Elm_Layout *playout = elm_object_part_content_unset(this->conform, "elm.swallow.content"); evas_object_hide(playout); if (!effect_layout) @@ -85,12 +83,12 @@ Elm_Layout *ui_base_viewmgr::set_transition_layout(string transition_style) //Create and add effect_layouts in map here. //FIXME: If we have to support many effects, this logic should be changed. effect_map.insert(pair("default", this->layout)); - this->create_base_layout(this->scroller, transition_style.c_str()); + this->create_base_layout(this->get_conformant(), transition_style.c_str()); effect_map.insert(pair(transition_style, this->layout)); } else { - elm_object_part_content_set(this->scroller, "elm.swallow.content", effect_layout); + elm_object_part_content_set(this->conform, "elm.swallow.content", effect_layout); this->layout = effect_layout; } @@ -171,22 +169,6 @@ bool ui_base_viewmgr::create_conformant(Elm_Win *win) return true; } -bool ui_base_viewmgr::create_scroller(Elm_Conformant *conform) -{ - Elm_Scroller *scroller = elm_scroller_add(conform); - if (!scroller) return false; - - elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO); - evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL); - - elm_object_content_set(conform, scroller); - - this->scroller = scroller; - - return true; -} - ui_base_viewmgr::ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener) : ui_iface_viewmgr(), key_listener(key_listener), transition_style("default") { @@ -245,13 +227,7 @@ ui_base_viewmgr::ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_list return; } - if (!this->create_scroller(this->conform)) - { - LOGE("Failed to create a scroller (%s)", pkg); - return; - } - - if (!this->create_base_layout(this->scroller, "default")) + if (!this->create_base_layout(this->conform, "default")) { LOGE("Failed to create a base layout (%s)", pkg); return; -- 2.7.4