Fix for TDIS-3901.[Expandable Edit Area in SplitPanel issue]
authorsr.shashank <sr.shashank@samsung.com>
Wed, 3 Apr 2013 10:12:39 +0000 (15:42 +0530)
committersr.shashank <sr.shashank@samsung.com>
Fri, 5 Apr 2013 10:30:17 +0000 (16:00 +0530)
Change-Id: Ie3fe4658038824ed6db36534f353429c7753535d
Signed-off-by: sr.shashank <sr.shashank@samsung.com>
src/ui/controls/FUiCtrl_SplitPanel.cpp
src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp
src/ui/inc/FUiCtrl_SplitPanelPresenter.h

index c964217..41ebdbf 100755 (executable)
@@ -404,6 +404,8 @@ _SplitPanel::SetPane(_Control* pControl, SplitPanelPaneOrder paneOrder)
                __pSecondPane = pControl;
        }
 
+        __pSplitPanelPresenter->RecalcSplitPanel();
+
        return E_SUCCESS;
 }
 
index 4c6e94a..0717806 100644 (file)
@@ -49,6 +49,7 @@ _SplitPanelPresenter::_SplitPanelPresenter(void)
        , __dividerMinimumPosition(0.0f)
        , __splitPanelDividerPressed(false)
        , __setFirstDividerPositionChangeEvent(true)
+       , __isChangeBounds(false)
        , __dividerRectangle(0.0f, 0.0f ,0.0f, 0.0f)
        , __dividerThumbRectangle(0.0f, 0.0f, 0.0f, 0.0f)
        , __pDividerPressedBackgroundBitmap(null)
@@ -175,6 +176,11 @@ _SplitPanelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
                Draw();
        }
 
+       if (__isChangeBounds == true)
+       {
+               __isChangeBounds = false;
+       }
+
        return E_SUCCESS;
 }
 
@@ -194,6 +200,11 @@ _SplitPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& tou
                return false;
        }
 
+       if (CheckDividerTouchRegion(point.x, point.y) == true)
+       {
+               __isChangeBounds = true;
+       }
+
        point = touchinfo.GetCurrentPosition();
        pThumbBitmap = __pDividerThumbBitmap;
 
@@ -243,6 +254,11 @@ _SplitPanelPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo&
                Draw();
        }
 
+       if (__isChangeBounds == true)
+       {
+               __isChangeBounds = false;
+       }
+
        return E_SUCCESS;
 }
 
@@ -437,7 +453,7 @@ CATCH:
 result
 _SplitPanelPresenter::Draw(void)
 {
-       if (__pSplitPanelModel->GetPaneMaximumState() == false && GetTransactionStatus() == ANIMATION_TRANSACTION_STATUS_STOPPED)
+       if (GetTransactionStatus() == ANIMATION_TRANSACTION_STATUS_STOPPED)
        {
                FloatRectangle dividerBounds(0.0f, 0.0f, 0.0f, 0.0f);
                FloatRectangle dividerThumbBounds(0.0f, 0.0f, 0.0f, 0.0f);
@@ -454,7 +470,12 @@ _SplitPanelPresenter::Draw(void)
                        pCanvas->Clear();
 
                        //resize pane
-                       SetPaneBounds();
+                       if (__isChangeBounds)
+                       {
+                               SetPaneBounds();
+
+                               __isChangeBounds = false;
+                       }
 
                        dividerBounds = __dividerRectangle;
                        dividerBounds.x = 0.0f;
@@ -556,6 +577,8 @@ _SplitPanelPresenter::RecalcSplitPanel(void)
 void
 _SplitPanelPresenter::OnChangeLayout(_ControlOrientation orientation)
 {
+       __isChangeBounds = true;
+
        AnimationTransaction::Stop(__transactionIdMaximize);
        AnimationTransaction::Stop(__transactionIdRestore);
 
@@ -565,7 +588,10 @@ _SplitPanelPresenter::OnChangeLayout(_ControlOrientation orientation)
 void
 _SplitPanelPresenter::OnBoundsChanged(void)
 {
-       RecalcSplitPanel();
+       __isChangeBounds = true;
+
+       AnimationTransaction::Stop(__transactionIdMaximize);
+       AnimationTransaction::Stop(__transactionIdRestore);
 
        return;
 }
@@ -585,6 +611,7 @@ _SplitPanelPresenter::SetPaneBounds(void)
        FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f);
        FloatRectangle firstPaneBounds(0.0f, 0.0f, 0.0f, 0.0f);
        FloatRectangle secondPaneBounds(0.0f, 0.0f, 0.0f, 0.0f);
+       FloatRectangle dividerBounds(0.0f, 0.0f, 0.0f, 0.0f);
        FloatPoint panePostion(0.0f, 0.0f);
        _Control* pFirstPane = null;
        _Control* pSecondPane = null;
@@ -613,6 +640,11 @@ _SplitPanelPresenter::SetPaneBounds(void)
                {
                        secondPaneBounds = FloatRectangle(0.0f, clientBounds.height + __dividerRectangle.height, clientBounds.width, clientBounds.height - __dividerRectangle.y - __dividerRectangle.height);
                }
+
+               dividerBounds = __dividerRectangle;
+               dividerBounds.x = clientBounds.width;
+
+               __pSplitPanel->SetDividerVisualElementBounds(dividerBounds);
        }
        else if (IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND))
        {
@@ -626,6 +658,11 @@ _SplitPanelPresenter::SetPaneBounds(void)
                {
                        firstPaneBounds = FloatRectangle(0.0f, clientBounds.y -__dividerRectangle.y - __dividerRectangle.height, clientBounds.width, __dividerRectangle.y);
                }
+
+               dividerBounds = __dividerRectangle;
+               dividerBounds.x = -__dividerRectangle.width;
+
+               __pSplitPanel->SetDividerVisualElementBounds(dividerBounds);
        }
        else
        {
index 8b4ea6b..621fbe5 100644 (file)
@@ -119,6 +119,7 @@ private:
        float __dividerMinimumPosition;
        bool __splitPanelDividerPressed;
        bool __setFirstDividerPositionChangeEvent;
+       bool __isChangeBounds;
 
        Tizen::Graphics::FloatRectangle __dividerRectangle;
        Tizen::Graphics::FloatRectangle __dividerThumbRectangle;