summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-03-17 19:04:21 -0400
committerPatrick Luby <guibomacdev@gmail.com>2024-03-21 11:45:08 +0100
commitfbe350cb9f35039f8b10f8ac9aba6737cb5d84be (patch)
treec8699a8c1f9c43992892c25ce10f9b0d470d8170 /svtools
parentf9da95ca43dc10cda99d985a6365aec2ede3be4f (diff)
tdf#93352 Fix horizontal swiping and scrolling when using an RTL UI
Starting with commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2, horizontal swiping in Calc moved in the wrong direction scrollbars were drawn mirrored. So, revert parts of commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2 so that we are using Calc's previous "negative scrollbar range" implementation for RTL UIs, but only for horizontal scrollbars since vertical scrollbars are the same in LTR and RTL UIs. Also, always disable RTL for scrollbars. Enabling RTL causes the following bugs when clicking or dragging the mouse in scrollbars in Calc's RTL UI: - Click or drag events get mirrored so you must click or drag in unexpected locations to move the scrollbar thumb in the desired direction - Repeatedly dragging the scrollbar thumb leftward can only move no highter than the R, S, or T columns Note: even though RTL is always disabled for Calc scrollbars, the arrows must still be swapped in vcl's ScrollBar class. Change-Id: I85aac94ffaf7df2eeb251a3ff150cc0363b5d770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164959 Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/scrolladaptor.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svtools/source/control/scrolladaptor.cxx b/svtools/source/control/scrolladaptor.cxx
index 6d01e9d414d7..8c2725c1715d 100644
--- a/svtools/source/control/scrolladaptor.cxx
+++ b/svtools/source/control/scrolladaptor.cxx
@@ -122,4 +122,6 @@ tools::Long ScrollAdaptor::DoScroll(tools::Long nNewPos)
void ScrollAdaptor::SetThickness(int nThickness) { m_xScrollBar->set_scroll_thickness(nThickness); }
+void ScrollAdaptor::SetSwapArrows(bool bSwap) { m_xScrollBar->set_scroll_swap_arrows(bSwap); }
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */