vcl/source/window/splitwin.cxx |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

New commits:
commit 6f17d2bccbf8dd63736a49e227d1984da6a72a65
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Mon Oct 7 15:52:46 2013 +0200

    fdo#70160: Revert "Sidebar: Correcting anomalous mouse behaviour while 
resizing"
    
    Let's revert this for the time being, before we have the full solution that
    works both for sidebars, as well as for the normal docked windows.
    
    This reverts commit 16ea2dc1f572d698923c770a2a58f7ab402d1298.

diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index e9286bd..2322189 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2542,30 +2542,21 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
         {
             sal_Bool    bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? 
sal_True : sal_False;
             sal_Bool    bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True 
: sal_False;
+            long    nDelta = mnMSplitPos-mnMStartPos;
 
             if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems )
             {
-                // nDelta corresponds to the direction to which user drags the 
mouse.
-                // If nDelta > 0, means user has dragged the handle towards 
the right and vice-versa
-                long nDelta = mnMSplitPos-mnMStartPos;
-
                 if ( (mpSplitSet == mpMainSet) && mbBottomRight )
                     nDelta *= -1;
                 ImplSetWindowSize( nDelta );
             }
             else
             {
-                long nNewSize( 0 );
-
-                // where is the sidebar is attached?
+                long nNewSize = mpSplitSet->mpItems[mnSplitPos].mnPixSize;
                 if ( (mpSplitSet == mpMainSet) && mbBottomRight )
-                    nNewSize = mnMaxSize - mnMStartPos; // right hand side of 
the screen
+                    nNewSize -= nDelta;
                 else
-                    nNewSize = mnMStartPos; // left hand side of the screen
-
-                // do not make the sidebar wider than mnMaxSize
-                nNewSize = std::min(nNewSize, 
mpSplitSet->mpItems[mnSplitPos].mnMaxSize);
-
+                    nNewSize += nDelta;
                 SplitItem( mpSplitSet->mpItems[mnSplitPos].mnId, nNewSize,
                            bPropSmaller, bPropGreater );
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to