[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - vcl/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 27 10:14:40 UTC 2019
vcl/source/window/window2.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 9e2e2e660c11d6bcd3714d8f4b2e46757cfb1ab1
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Mar 26 17:51:37 2019 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Mar 27 12:08:34 2019 +0200
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
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)
{
More information about the Libreoffice-commits
mailing list