vcl/source/window/window2.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 845743131b733b52eb913048f55f5efdd013b24f
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Thu Jun 6 06:22:00 2019 +0200
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Fri Jun 14 00:57:28 2019 +0200

    VCL make horizontal scrolling depend on RTL
    
    This is easiest to test in calc. We have two test cases, because
    the document and the GUI can either have different or equal RTL
    settings. This fixes the horizontal border scrolling for me on
    Linux with gen, gtk / gtk3 and qt5 /kde5.
    
    It looks a bit strange that this inverts the delta, if the RTL
    settings are equal, but it seems not all toolkits invert the
    delta in RTL mode, like Qt does.
    
    I also tried to implement this inside ScrollBar::ImplScroll, but
    the Scrollbar has no idea of the wheel event origin, the only one
    which must be inverted.
    
    Change-Id: I239cf6528de95ad581834ec77a13f582aeff5a91
    Reviewed-on: https://gerrit.libreoffice.org/73923
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>
    (cherry picked from commit dc326926b0adc35b6ebefa7705ee5a3f133f5c88)
    Reviewed-on: https://gerrit.libreoffice.org/73993

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index a5174bb8e367..c38d0f7cdefc 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -665,10 +665,9 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
                             nLines = pData->GetNotchDelta() * nScrollLines;
                         if ( nLines )
                         {
-                            ImplHandleScroll( nullptr,
-                                          0L,
-                                          pData->IsHorz() ? pHScrl : pVScrl,
-                                          nLines );
+                            ImplHandleScroll(nullptr, 0L, pData->IsHorz() ? 
pHScrl : pVScrl,
+                                pData->IsHorz() && pHScrl && 
(AllSettings::GetLayoutRTL() == pHScrl->IsRTLEnabled())
+                                    ? -nLines : nLines);
                             bRet = true;
                         }
                     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to