[Libreoffice-commits] core.git: vcl/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 26 16:27:13 UTC 2019


 vcl/source/window/window2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cddb51d709f58f54fbf303fdb567ea0484852657
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Mar 26 17:51:37 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Mar 26 18:24:21 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". The DoScroll() call takes as argument how much the
    "thumb" should be moved, though.
    
    Change-Id: Id95a4bf9d2bb4e950dd85c6bebb4d2b5f2726ee0

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index c352b006d67e..2726c283ebde 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -760,7 +760,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