summaryrefslogtreecommitdiff
path: root/include
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 /include
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 '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 408ca90d7483..e8b9d37584ed 100644
--- a/include/vcl/toolkit/scrbar.hxx
+++ b/include/vcl/toolkit/scrbar.hxx
@@ -58,6 +58,7 @@ private:
ScrollType meScrollType;
bool mbCalcSize;
bool mbFullDrag;
+ bool mbSwapArrows;
Link<ScrollBar*,void> maScrollHdl;
Link<ScrollBar*,void> maEndScrollHdl;
@@ -133,6 +134,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 c93524e3bfd4..8b9495e9e4e8 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;