Merge "Modified OnTouchPressed bubbling operation in TableView" into tizen_2.1
authorSangYong Lee <sangyongim.lee@samsung.com>
Thu, 4 Apr 2013 08:55:09 +0000 (17:55 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 4 Apr 2013 08:55:09 +0000 (17:55 +0900)
28 files changed:
res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_bottom.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_left.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_right.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_top.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_overscrolling_bottom.#.png [moved from res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_overscrolling_left.#.png [moved from res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_overscrolling_right.#.png [moved from res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_right.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_overscrolling_top.#.png [moved from res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_top.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_bottom.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_left.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_right.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_top.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_overscrolling_bottom.#.png [moved from res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_bottom.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_overscrolling_left.#.png [moved from res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_left.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_overscrolling_right.#.png [moved from res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_right.#.png with 100% similarity, mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_overscrolling_top.#.png [moved from res/common/usr/share/osp/bitmaps/720x1280/00_overscrolling_top.#.png with 100% similarity, mode: 0644]
src/ui/FUi_EcoreEvas.cpp
src/ui/FUi_UiManagerProxy.cpp
src/ui/animations/FUiAnim_AnimationManager.cpp
src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp
src/ui/controls/FUiCtrl_IconListPresenter.cpp [changed mode: 0755->0644]
src/ui/controls/FUiCtrl_ListViewImpl.cpp
src/ui/controls/FUiCtrl_PopupImpl.cpp
src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp
src/ui/controls/FUiCtrl_ScrollPanel.cpp
src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp
src/ui/inc/FUi_EcoreEvas.h
src/ui/resource/FUi_ResourceMessageBoxConfig.cpp

diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_bottom.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_bottom.#.png
new file mode 100644 (file)
index 0000000..155b4ee
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_bottom.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_left.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_left.#.png
new file mode 100644 (file)
index 0000000..2a0f9dd
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_left.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_right.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_right.#.png
new file mode 100644 (file)
index 0000000..9ee6dd4
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_right.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_top.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_top.#.png
new file mode 100644 (file)
index 0000000..a12762b
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_overscrolling_top.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_bottom.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_bottom.#.png
new file mode 100644 (file)
index 0000000..d3477a2
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_bottom.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_left.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_left.#.png
new file mode 100644 (file)
index 0000000..d88ac6d
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_left.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_right.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_right.#.png
new file mode 100644 (file)
index 0000000..f9fa49d
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_right.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_top.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_top.#.png
new file mode 100644 (file)
index 0000000..72301b8
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_overscrolling_top.#.png differ
index b27526e..a35250e 100644 (file)
@@ -1324,15 +1324,22 @@ unsigned int
 _EcoreEvas::GetActiveWindow(void)
 {
        Ecore_X_Window* pRoots = null;
+       Ecore_X_Window activeWin = 0;
        int num = 0;
 
        pRoots = ecore_x_window_root_list(&num);
-       Ecore_X_Atom activeAtom = ecore_x_atom_get("_NET_ACTIVE_WINDOW");
+       if (pRoots)
+       {
+               Ecore_X_Atom activeAtom = ecore_x_atom_get("_NET_ACTIVE_WINDOW");
+               int ret = ecore_x_window_prop_window_get(pRoots[0], activeAtom, &activeWin, 1);
 
-       Ecore_X_Window activeWin = 0;
-       ecore_x_window_prop_window_get(pRoots[0], activeAtom, &activeWin, 1);
+               free(pRoots);
 
-       free(pRoots);
+               if (ret < 0)
+               {
+                       return 0;                       
+               }
+       }
 
        return activeWin;
 }
@@ -1967,9 +1974,11 @@ _EcoreEvas::IsWindowVisible(const _Window& window)
        }
 }
 
+// [ToDo] Remove API
 void
 _EcoreEvas::SetQuickPanelScrollEnabled(const _Window& window, bool enable)
 {
+       /*
        _EflLayer* pLayer = GetEflLayer(window);
        SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
 
@@ -1992,11 +2001,14 @@ _EcoreEvas::SetQuickPanelScrollEnabled(const _Window& window, bool enable)
        }
 
        ecore_x_window_prop_card32_set(win, atomPanelScrollable, val, 3);
+       */
 }
 
+// [ToDo] Remove API
 bool
 _EcoreEvas::IsQuickPanelScrollEnabled(const _Window& window)
 {
+       /*
        _EflLayer* pLayer = GetEflLayer(window);
        SysTryReturn(NID_UI, pLayer, false, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
 
@@ -2017,6 +2029,9 @@ _EcoreEvas::IsQuickPanelScrollEnabled(const _Window& window)
        {
                return true;
        }
+       */
+       
+       return true;
 }
 
 void
index 7ed3921..04e5388 100644 (file)
@@ -62,7 +62,8 @@ _UiManagerProxy::SetZOrderGroup(unsigned int window, int windowZOrderGroup)
        SysTryReturnResult(NID_UI, pMsg, E_OUT_OF_MEMORY, "Memory is insufficient.");
 
        SysLog(NID_UI, "IPC message(0x%x, %d) is sent.", window, windowZOrderGroup);
-       __pIpcClient->SendRequest(*pMsg.get());
+       result ret = __pIpcClient->SendRequest(*pMsg.get());
+       SysTryReturnResult(NID_UI, ret == E_SUCCESS, ret, "Propagating.");
        SysTryReturnResult(NID_UI, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
 
        return E_SUCCESS;
index 1485413..f62d7d2 100644 (file)
@@ -822,8 +822,9 @@ _AnimationManager::ProcessCommittedTransaction(void)
                        pNode->SetChildrenBaseTime(_AnimationTime::GetTime());
 
                        __pRootTransaction->AddChild(*pNode);
+
+                       __committedList.SetAt(null, index);
                }
-               __committedList.SetAt(null, index);
        }
 
        __committedList.RemoveAll();
index 721e50f..fbfb209 100644 (file)
@@ -643,6 +643,8 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType
                else
                {
                        _ListViewItemStatus itemStatus;
+                       memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
+
                        _TouchManager* pTouchManager = _TouchManager::GetInstance();
                        bool needChangeEventTarget = false;
                        int touchedGroupIndex = -1;
@@ -1596,12 +1598,14 @@ protected:
                result r = E_SYSTEM;
                _UiBuilderControlLayout* pControlProperty = null;
                GroupedListView* pGroupedListView = null;
-               Rectangle rect;
+               FloatRectangle rect;
 
+               ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT;
                GroupedListViewStyle style = GROUPED_LIST_VIEW_STYLE_INDEXED;
+               ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION;
+
                String elementString;
                bool itemDividerState = true;
-               bool fastScrollState = false;
                int opacity = 100;
                bool sweepEnabledState = false;
                Color color;
@@ -1618,7 +1622,7 @@ protected:
                        return null;
                }
 
-               rect = pControlProperty->GetRect();
+               rect = pControlProperty->GetRectF();
 
                String styleString;
                styleString = pControlProperty->GetStyle();
@@ -1645,19 +1649,34 @@ protected:
                        }
                }
 
-               if (pControl->GetElement(L"fastScroll", elementString))
+               if (pControl->GetElement(L"listScrollStyle", elementString))
                {
-                       if (elementString.Equals(L"true", false))
+                       if (elementString.Equals(L"SCROLL_STYLE_FIXED", false))
                        {
-                               fastScrollState = true;
+                               scrollStyle = SCROLL_STYLE_FIXED;
                        }
-                       else
+                       else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false))
+                       {
+                               scrollStyle = SCROLL_STYLE_FAST_SCROLL;
+                       }
+                       else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false))
+                       {
+                               scrollStyle = SCROLL_STYLE_JUMP_TO_TOP;
+                       }
+                       else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false))
                        {
-                               fastScrollState = false;
+                               scrollStyle = SCROLL_STYLE_THUMB;
+                       }
+               }
+               else if (pControl->GetElement(L"fastScroll", elementString))
+               {
+                       if (elementString.Equals(L"true", false))
+                       {
+                               scrollStyle = SCROLL_STYLE_FAST_SCROLL;
                        }
                }
 
-               r = pGroupedListView->Construct(rect, style, itemDividerState, fastScrollState);
+               r = pGroupedListView->Construct(rect, style, itemDividerState, scrollStyle);
                SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
                // Set BackgroundsBitmap
@@ -1745,11 +1764,21 @@ protected:
                        SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
+               // scroll Input Mode
+               if (pControl->GetElement(L"scrollInputMode", elementString))
+               {
+                       if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false))
+                       {
+                               scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION;
+                       }
+
+                       pGroupedListView->SetScrollInputMode(scrollInputMode);
+               }
+
                return pGroupedListView;
 
        CATCH:
                delete pGroupedListView;
-               pGroupedListView = null;
                return null;
        }
 
old mode 100755 (executable)
new mode 100644 (file)
index 3e21abb..ce20b2a
@@ -3422,6 +3422,11 @@ _IconListPresenter::OnTickOccurred(const VisualElementAnimation& animation, cons
        {
                Canvas* pCanvas = __pCheckAnimationVE->GetCanvasN();
 
+               if (pCanvas == null)
+               {
+                       return;
+               }
+
                const Bitmap* pBitmap = null;
                pBitmap = IsItemChecked(__checkedIndex) ? __pItemDrawingProperty->GetCheckBitmap(): null;
 
@@ -4470,6 +4475,12 @@ _IconListPresenter::StartCheckAnimation(int index)
        const Bitmap* pBackgroundBitmap = __pListModel->IsItemEnabled(DEFAULT_GROUP_INDEX, index) ? (IsItemChecked(index) ? __pItemDrawingProperty->GetCheckedBackgroundBitmap() : __pItemDrawingProperty->GetUnCheckedBackgroundBitmap()) : __pItemDrawingProperty->GetDisabledCheckBitmap();
 
        Canvas* pCheckBgCanvas = pItem->GetCheckBGVisualElement()->GetCanvasN();
+
+       if (pCheckBgCanvas == null)
+       {
+               return;
+       }
+
        pCheckBgCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
        pCheckBgCanvas->Clear();
 
index cba5892..60c10cd 100644 (file)
@@ -615,6 +615,8 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type, bool needFlush)
                if ((topItemIndex <= index) && (bottomItemIndex >= index))
                {
                        _ListViewItemStatus itemStatus;
+                       memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
+
                        _TouchManager* pTouchManager = _TouchManager::GetInstance();
                        bool needChangeEventTarget = false;
 
@@ -1472,11 +1474,13 @@ protected:
                result r = E_SYSTEM;
                _UiBuilderControlLayout* pControlProperty = null;
                ListView* pListView = null;
-               Rectangle rect;
+               FloatRectangle rect;
                String elementString;
 
+               ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT;
+               ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION;
+
                bool hasItemDivider = true;
-               bool hasFastScroll = false;
                int opacity = 100;
                bool isSweepEnabled = false;
                Color color;
@@ -1493,7 +1497,7 @@ protected:
                        return null;
                }
 
-               rect = pControlProperty->GetRect();
+               rect = pControlProperty->GetRectF();
 
                //Construct
                if (pControl->GetElement(L"itemDivider", elementString))
@@ -1508,27 +1512,36 @@ protected:
                        }
                }
 
-               if (pControl->GetElement(L"fastScroll", elementString))
+               if (pControl->GetElement(L"listScrollStyle", elementString))
                {
-                       if (elementString.Equals(L"true", false))
+                       if (elementString.Equals(L"SCROLL_STYLE_FIXED", false))
                        {
-                               hasFastScroll = true;
+                               scrollStyle = SCROLL_STYLE_FIXED;
                        }
-                       else
+                       else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false))
                        {
-                               hasFastScroll = false;
+                               scrollStyle = SCROLL_STYLE_FAST_SCROLL;
+                       }
+                       else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false))
+                       {
+                               scrollStyle = SCROLL_STYLE_JUMP_TO_TOP;
+                       }
+                       else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false))
+                       {
+                               scrollStyle = SCROLL_STYLE_THUMB;
                        }
                }
-
-               r = pListView->Construct(rect, hasItemDivider, hasFastScroll);
-               if (r != E_SUCCESS)
+               else if (pControl->GetElement(L"fastScroll", elementString))
                {
-                       delete pListView;
-                       pListView = null;
-
-                       return null;
+                       if (elementString.Equals(L"true", false))
+                       {
+                               scrollStyle = SCROLL_STYLE_FAST_SCROLL;
+                       }
                }
 
+               r = pListView->Construct(rect, hasItemDivider, scrollStyle);
+               SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+
                // Set BackgroundsBitmap
                if (pControl->GetElement("backgroundBitmapPath", elementString))
                {
@@ -1536,22 +1549,26 @@ protected:
                        pBackgroundBitmap = LoadBitmapN(elementString);
                        if (pBackgroundBitmap != null)
                        {
-                               pListView->SetBackgroundBitmap(pBackgroundBitmap);
+                               r = pListView->SetBackgroundBitmap(pBackgroundBitmap);
                                delete pBackgroundBitmap;
                                pBackgroundBitmap = null;
+
+                               SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                        }
                }
 
                // Set Empty List
                if (pControl->GetElement(L"textOfEmptyList", elementString))
                {
-                       pListView->SetTextOfEmptyList(elementString);
+                       r = pListView->SetTextOfEmptyList(elementString);
+                       SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
                if (pControl->GetElement(L"colorOfEmptyListText", elementString))
                {
                        ConvertStringToColor(elementString, color);
-                       pListView->SetTextColorOfEmptyList(color);
+                       r = pListView->SetTextColorOfEmptyList(color);
+                       SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
                if (pControl->GetElement(L"bitmapPathOfEmptyList", elementString))
@@ -1560,10 +1577,11 @@ protected:
                        pBackgroundBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565);
                        if (pBackgroundBitmap != null)
                        {
-                               pListView->SetBitmapOfEmptyList(pBackgroundBitmap);
-
+                               r = pListView->SetBitmapOfEmptyList(pBackgroundBitmap);
                                delete pBackgroundBitmap;
                                pBackgroundBitmap = null;
+
+                               SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                        }
                }
 
@@ -1575,13 +1593,15 @@ protected:
                if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString))
                {
                        ConvertStringToColor32(elementString, opacity, color);
-                       pListView->SetBackgroundColor(color);
+                       r = pListView->SetBackgroundColor(color);
+                       SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
                if (pControl->GetElement(L"itemDividerColor", elementString))
                {
                        ConvertStringToColor(elementString, color);
-                       pListView->SetItemDividerColor(color);
+                       r = pListView->SetItemDividerColor(color);
+                       SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
                if (pControl->GetElement(L"sweepEnabled", elementString))
@@ -1595,10 +1615,26 @@ protected:
                                isSweepEnabled = false;
                        }
 
-                       pListView->SetSweepEnabled(isSweepEnabled);
+                       r = pListView->SetSweepEnabled(isSweepEnabled);
+                       SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+               }
+
+               // scroll Input Mode
+               if (pControl->GetElement(L"scrollInputMode", elementString))
+               {
+                       if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false))
+                       {
+                               scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION;
+                       }
+
+                       pListView->SetScrollInputMode(scrollInputMode);
                }
 
                return pListView;
+
+       CATCH:
+               delete pListView;
+               return null;
        }
 
 private:
index fc819cb..8f7b36e 100644 (file)
@@ -311,7 +311,7 @@ _PopupImpl::GetXmlBounds(Tizen::Graphics::FloatRectangle& rect)
 
        if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
        {
-               GetBuilderBounds(controlOrientation, builderBounds);
+               exist = GetBuilderBounds(controlOrientation, builderBounds);
        }
        rect = _CoordinateSystemUtils::ConvertToFloat(builderBounds);
 
index d2bcd49..2d84b8a 100755 (executable)
@@ -116,6 +116,7 @@ _ProgressPopupPresenter::SetTitleTextObject(void)
        float titleLeftMargin = 0.0f;
        float titleRightMargin = 0.0f;
 
+       float transTopMargin = 0.0f;
        float transLeftMargin = 0.0f;
        float transRightMargin = 0.0f;
 
@@ -130,6 +131,7 @@ _ProgressPopupPresenter::SetTitleTextObject(void)
        GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin);
        GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin);
 
+       GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
        GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin);
        GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin);
 
@@ -161,13 +163,13 @@ _ProgressPopupPresenter::SetTitleTextObject(void)
                        __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
                }
                __pTitleTextObject->SetBounds(FloatRectangle(titleLeftMargin + transLeftMargin,
-                                                                                       titleTopMargin,
+                                                                                       titleTopMargin + transTopMargin,
                                                                                        defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
                                                                                        titleHeight - titleTopMargin));
                __pTitleTextObject->Compose();
 
                __titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin,
-                                                               titleTopMargin,
+                                                               titleTopMargin + transTopMargin,
                                                                defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
                                                                titleHeight - titleTopMargin);
        }
@@ -262,7 +264,7 @@ _ProgressPopupPresenter::SetTextObject(void)
                }
 
                __pBodyTextObject->SetBounds(FloatRectangle(textLeftMargin + transLeftMargin,
-                                                                                               titleHeight + animationWidth + noTitleHeight,
+                                                                                               titleHeight + textTopMargin + transTopMargin + animationWidth + noTitleHeight,
                                                                                                defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
                                                                                                maxHeight - titleHeight - bottomHeight - animationWidth));
                __pBodyTextObject->Compose();
index 2f82810..7e6f8af 100644 (file)
@@ -123,7 +123,7 @@ _ScrollPanel::CreateScrollPanelN(const FloatRectangle& rect, ScrollPanelScrollDi
        _Scroll* pHorizontalScrollBar = null;
        _Scroll* pVerticalScrollBar = null;
 
-       FloatRectangle areaBounds = const_cast<FloatRectangle&>(rect);
+       FloatRectangle areaBounds(rect);
 
        _ScrollPanel* pScrollPanel = new (std::nothrow) _ScrollPanel;
        SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
index 1f33e2c..5c1b53a 100644 (file)
@@ -208,8 +208,7 @@ _ScrollPanelPresenter::OnBoundsChanged(void)
 void
 _ScrollPanelPresenter::OnChildAttached(const _Control& child)
 {
-       if (&child != __pScrollPanel->GetVerticalScrollBar()
-                       && &child != __pScrollPanel->GetHorizontalScrollBar())
+       if (child.GetArea() != _CONTROL_AREA_SYSTEM)
        {
                if (__pScrollPanel->IsScrollAreaAutoResizingEnabled())
                {
@@ -226,8 +225,7 @@ _ScrollPanelPresenter::OnChildAttached(const _Control& child)
 void
 _ScrollPanelPresenter::OnChildDetached(const _Control& child)
 {
-       if (&child != __pScrollPanel->GetVerticalScrollBar()
-                       && &child != __pScrollPanel->GetHorizontalScrollBar())
+       if (child.GetArea() != _CONTROL_AREA_SYSTEM)
        {
                if (__pScrollPanel->IsScrollAreaAutoResizingEnabled())
                {
@@ -244,8 +242,7 @@ _ScrollPanelPresenter::OnChildDetached(const _Control& child)
 void
 _ScrollPanelPresenter::OnChildBoundsChanged(const _Control& child)
 {
-       if (&child != __pScrollPanel->GetVerticalScrollBar()
-                       && &child != __pScrollPanel->GetHorizontalScrollBar())
+       if (child.GetArea() != _CONTROL_AREA_SYSTEM)
        {
                if (__pScrollPanel->IsScrollAreaAutoResizingEnabled())
                {
@@ -373,20 +370,31 @@ _ScrollPanelPresenter::FixScrollPositionIntoScrollAreaBounds(float position) con
 float
 _ScrollPanelPresenter::FixScrollPositionIntoScrollAreaBounds(float position, FloatRectangle bounds, FloatRectangle scrollArea) const
 {
-       float minScrollPos = 0.0f;
-       float maxScrollPos = 0.0f;
+       float minScrollPosition = 0.0f;
+       float maxScrollPosition = 0.0f;
        if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
        {
-               minScrollPos = scrollArea.x;
-               maxScrollPos = scrollArea.x + scrollArea.width - bounds.width;
+               minScrollPosition = scrollArea.x;
+               maxScrollPosition = scrollArea.x + scrollArea.width - bounds.width;
        }
        else
        {
-               minScrollPos = scrollArea.y;
-               maxScrollPos = scrollArea.y + scrollArea.height - bounds.height;
+               minScrollPosition = scrollArea.y;
+               maxScrollPosition = scrollArea.y + scrollArea.height - bounds.height;
+       }
+
+       if (minScrollPosition > maxScrollPosition)
+       {
+               maxScrollPosition = minScrollPosition;
+       }
+       if (position < minScrollPosition)
+       {
+               position = minScrollPosition;
+       }
+       if (position > maxScrollPosition)
+       {
+               position = maxScrollPosition;
        }
-       position = position < minScrollPos ? minScrollPos : position;
-       position = position > maxScrollPos ? maxScrollPos : position;
 
        return position;
 }
@@ -495,23 +503,25 @@ _ScrollPanelPresenter::RunTouchReleased(const _Control& source, const _TouchInfo
                if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
                {
                        pageSize = __pScrollPanel->GetPageScrollAlignSize().width;
-                       maxPosition = GetScrollAreaBounds().width - pageSize;
+                       maxPosition = GetScrollAreaBounds().width - __pScrollPanel->GetBoundsF().width;
                        currentPosition = GetHorizontalScrollPosition();
                }
                else
                {
                        pageSize = __pScrollPanel->GetPageScrollAlignSize().height;
-                       maxPosition = GetScrollAreaBounds().height - pageSize;
+                       maxPosition = GetScrollAreaBounds().height - __pScrollPanel->GetBoundsF().height;
                        currentPosition = GetVerticalScrollPosition();
                }
 
                float targetPosition = 0.0f;
-               float pageGap = currentPosition - (((int)(currentPosition / pageSize)) * pageSize);
                int lowerPageIndex = currentPosition / pageSize;
                float currentPageMin = pageSize * lowerPageIndex;
+               float pageGap = currentPosition - currentPageMin;
                float currentPageMax = currentPageMin + pageSize;
-               currentPageMin = currentPageMax > maxPosition ? (maxPosition / pageSize) * pageSize : currentPageMin;
-               currentPageMax = currentPageMax > maxPosition ? maxPosition : currentPageMax;
+               if (currentPageMax > maxPosition)
+               {
+                       currentPageMax = maxPosition;
+               }
 
                if (pageGap <= currentPageMax - currentPageMin - pageGap)
                {
@@ -984,22 +994,20 @@ _ScrollPanelPresenter::DoFlickGestureRecognized(_TouchFlickGestureDetector& gest
                        if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
                        {
                                pageSize = __pScrollPanel->GetPageScrollAlignSize().width;
-                               maxPosition = scrollArea.width - pageSize;
+                               maxPosition = scrollArea.width - scrollPanelBounds.width;
                                scrollPosition = __pScrollPanelModel->GetCurrentHorizontalScrollPosition();
                        }
                        else
                        {
                                pageSize = __pScrollPanel->GetPageScrollAlignSize().height;
-                               maxPosition = scrollArea.height - pageSize;
+                               maxPosition = scrollArea.height - scrollPanelBounds.height;
                                scrollPosition = __pScrollPanelModel->GetCurrentVerticalScrollPosition();
                        }
 
-                       float pageGap = scrollPosition - (((int)(scrollPosition / pageSize)) * pageSize);
                        int lowerPageIndex = (scrollPosition + moveAmount) / pageSize;
                        float targetPageMin = pageSize * lowerPageIndex;
+                       float pageGap = (scrollPosition + moveAmount) - targetPageMin;
                        float targetPageMax = targetPageMin + pageSize;
-                       targetPageMin = targetPageMax > maxPosition ? (maxPosition / pageSize) * pageSize : targetPageMin;
-                       targetPageMax = targetPageMax > maxPosition ? maxPosition : targetPageMax;
 
                        if (pageGap <= targetPageMax - targetPageMin - pageGap)
                        {
@@ -1369,13 +1377,16 @@ _ScrollPanelPresenter::AdjustModel()
                                _Control* pControl = __pScrollPanel->GetChild(i);
                                SysTryReturnVoidResult(NID_UI_CTRL, pControl != null, E_SYSTEM, "[%s] pControl(child) is invalid pointer.", GetErrorMessage(E_SYSTEM));
 
-                               if (pControl == pVerticalScrollBar || pControl == pHorizontalScrollBar)
+                               if (pControl->GetArea() == _CONTROL_AREA_SYSTEM)
                                {
                                        continue;
                                }
 
                                float targetMaxPos = pControl->GetBoundsF().GetBottomRight().y;
-                               scrollArea.height = (scrollArea.height < targetMaxPos) ? targetMaxPos : scrollArea.height;
+                               if (scrollArea.height < targetMaxPos)
+                               {
+                                       scrollArea.height = targetMaxPos;
+                               }
                        }
                }
                else if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
@@ -1385,13 +1396,16 @@ _ScrollPanelPresenter::AdjustModel()
                                _Control* pControl = __pScrollPanel->GetChild(i);
                                SysTryReturnVoidResult(NID_UI_CTRL, pControl != null, E_SYSTEM, "[%s] pControl(child) is invalid pointer.", GetErrorMessage(E_SYSTEM));
 
-                               if (pControl == pVerticalScrollBar || pControl == pHorizontalScrollBar)
+                               if (pControl->GetArea() == _CONTROL_AREA_SYSTEM)
                                {
                                        continue;
                                }
 
                                float targetMaxPos = pControl->GetBoundsF().GetBottomRight().x;
-                               scrollArea.width = (scrollArea.width < targetMaxPos) ? targetMaxPos : scrollArea.width;
+                               if (scrollArea.width < targetMaxPos)
+                               {
+                                       scrollArea.width = targetMaxPos;
+                               }
                        }
                }
        }
@@ -1400,13 +1414,19 @@ _ScrollPanelPresenter::AdjustModel()
                scrollArea = GetScrollAreaBounds();
                if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
                {
-                       scrollArea.width = scrollArea.width < scrollPanelBounds.width ? scrollPanelBounds.width : scrollArea.width;
+                       if (scrollArea.width < scrollPanelBounds.width)
+                       {
+                               scrollArea.width = scrollPanelBounds.width;
+                       }
                        scrollArea.height = scrollPanelBounds.height;
                }
                else
                {
                        scrollArea.width = scrollPanelBounds.width;
-                       scrollArea.height = scrollArea.height < scrollPanelBounds.height ? scrollPanelBounds.height : scrollArea.height;
+                       if (scrollArea.height < scrollPanelBounds.height)
+                       {
+                               scrollArea.height = scrollPanelBounds.height;
+                       }
                }
        }
 
index 05da4b0..2ea6293 100644 (file)
@@ -133,8 +133,6 @@ public:
        result SetEventPropagation(const _Control& control, bool enable);
        result SetFocus(const _Control& control, bool focus);
 
-       void SetQuickPanelScrollEnabled(const _Window& window, bool enable);
-       bool IsQuickPanelScrollEnabled(const _Window& window);
        result SetIndicatorShowState(const _Window& window, bool showState);
        bool GetIndicatorShowState(const _Window& window) const;
 
@@ -162,6 +160,8 @@ public:
        Ecore_Evas* GetEcoreEvas(void) const;
        Evas_Object* GetWindowObject(void) const;
        Ecore_X_Window GetXWindow(void) const;
+       void SetQuickPanelScrollEnabled(const _Window& window, bool enable);
+       bool IsQuickPanelScrollEnabled(const _Window& window);
 
 private:
        Tizen::Ui::Animations::_EflLayer* GetEflLayer(const _Window& window) const;
index 254b54c..2e3edd7 100755 (executable)
@@ -68,7 +68,7 @@ START_UI_CONFIG(MESSAGEBOX);
                ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 16);
 
                ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 74);                    // 20121113
-               ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 20);          // 20121113
+               ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 16);          // 20130404
 
                ADD_SHAPE_CONFIG(BUTTON_TOP_MARGIN, 20);                        // 20121113
                ADD_SHAPE_CONFIG(BUTTON_BOTTOM_MARGIN, 24);             // 20130403