summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-03-17 19:04:21 -0400
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2024-03-21 21:56:23 +0100
commit227e51b6b4b3e6664c6ed9cc72c85ff3c3d03ab9 (patch)
treea9a9bc58ca658cbbca2497ae9c309e943653e15b /include
parente4519e38d3598c3e26f2585bbc2553bc7ff5db4c (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> (cherry picked from commit ac1024765d203496bc7d28cb3ed3a6d2215c53ad) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165116 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/scrolladaptor.hxx2
-rw-r--r--include/vcl/toolkit/scrbar.hxx3
-rw-r--r--include/vcl/weld.hxx1
3 files changed, 6 insertions, 0 deletions
diff --git a/include/svtools/scrolladaptor.hxx b/include/svtools/scrolladaptor.hxx
index cdc507078cf8..1eba1dfdf844 100644
--- a/include/svtools/scrolladaptor.hxx
+++ b/include/svtools/scrolladaptor.hxx
@@ -71,6 +71,8 @@ public:
void SetThickness(int nThickness);
+ void SetSwapArrows(bool bSwap = true);
+
ScrollAdaptor(vcl::Window* pParent, bool bHori);
virtual void dispose() override;
};
diff --git a/include/vcl/toolkit/scrbar.hxx b/include/vcl/toolkit/scrbar.hxx
index 6981b64fa622..363755fc4168 100644
--- a/include/vcl/toolkit/scrbar.hxx
+++ b/include/vcl/toolkit/scrbar.hxx
@@ -57,6 +57,7 @@ private:
ScrollType meScrollType;
bool mbCalcSize;
bool mbFullDrag;
+ bool mbSwapArrows;
Link<ScrollBar*,void> maScrollHdl;
Link<ScrollBar*,void> maEndScrollHdl;
@@ -132,6 +133,8 @@ public:
void SetEndScrollHdl( const Link<ScrollBar*,void>& rLink ) { maEndScrollHdl = rLink; }
virtual Size GetOptimalSize() const override;
+
+ void SetSwapArrows( bool bSwap ) { mbSwapArrows = bSwap; }
};
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 2d8c4db085d6..fc585bdb1071 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2576,6 +2576,7 @@ public:
virtual int get_scroll_thickness() const = 0;
virtual void set_scroll_thickness(int nThickness) = 0;
+ virtual void set_scroll_swap_arrows(bool bSwap) = 0;
virtual ScrollType get_scroll_type() const = 0;