summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-10-07 15:52:46 +0200
committerJan Holesovsky <kendy@collabora.com>2013-10-07 18:05:05 +0200
commit6f17d2bccbf8dd63736a49e227d1984da6a72a65 (patch)
treed9f93acc3cfc6b8786891339addfed68e9976d1a /vcl/source
parent7235d23267e4591e5cf47762abd3f63421b06904 (diff)
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.
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/splitwin.cxx17
1 files changed, 4 insertions, 13 deletions
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index e9286bdf2b0f..232218957c61 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 );
}