summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-03-26 17:51:37 +0200
committerTor Lillqvist <tml@collabora.com>2019-03-27 12:08:34 +0200
commit9e2e2e660c11d6bcd3714d8f4b2e46757cfb1ab1 (patch)
treeba1d95b8386aeb768b4916ed75a48a5644079806 /vcl
parentf961ebd3ea10313c409165f84ff0885fc2b09874 (diff)
Make contents of combobox follow the finger when scrolling with a pan gesture
It is the contents that we are dragging with the gesture, not the scrollbar "thumb". Before this change, the contents used to move much faster than the dragging finger. I am not sure whether it is still fully correct, though. Might be just coincidental that dividing with pVScrl->GetVisibleSize() happens to work nicely for typical comboboxes. Change-Id: Id95a4bf9d2bb4e950dd85c6bebb4d2b5f2726ee0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/window2.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index adbaf44d7fed..214226a9ae4f 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -819,7 +819,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
else if(pData->meEventType == GestureEventType::PanningUpdate)
{
long nOriginalPosition = mpWindowImpl->mpFrameData->mnTouchPanPosition;
- pVScrl->DoScroll(nOriginalPosition + (pData->mfOffset));
+ pVScrl->DoScroll(nOriginalPosition + (pData->mfOffset / pVScrl->GetVisibleSize()));
}
if (pData->meEventType == GestureEventType::PanningEnd)
{