summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPatrick Luby <plubius@libreoffice.org>2023-12-22 09:34:24 -0500
committerPatrick Luby <plubius@libreoffice.org>2023-12-22 21:28:21 +0100
commit8339bb40b22e9426a05eb1d122cc8ef12ab7a229 (patch)
treeb30e231596929e09a41dfbac446f2df9878a25bf /sc
parentc5cc7af60d4b93d4247fd88f941a323f4a56dfcd (diff)
Related: tdf#155266 Eliminate delayed scrollbar redrawing when swiping
By default, the layout idle timer in the InterimWindowItem class is set to TaskPriority::RESIZE. That is too high of a priority as it appears that other timers are drawing after the scrollbar has been redrawn. As a result, when swiping, the content moves fluidly but the scrollbar thumb does not move until after swiping stops or pauses. Then, after a short lag, the scrollbar thumb finally "jumps" to the expected position. So, to fix this scrollbar "stickiness" when swiping, setting the priority to TaskPriority::POST_PAINT causes the scrollbar to be redrawn after any competing timers. Change-Id: I8c0772fc40ddc690ee59c6267c1c50971f4ff238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161184 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Patrick Luby <plubius@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 44c74c5455a7..fd9e88d18f31 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -232,6 +232,20 @@ void ScTabView::InitScrollBar(ScrollAdaptor& rScrollBar, tools::Long nMaxVal, co
rScrollBar.SetMouseReleaseHdl(LINK(this, ScTabView, EndScrollHdl));
rScrollBar.EnableRTL( aViewData.GetDocument().IsLayoutRTL( aViewData.GetTabNo() ) );
+
+ // Related: tdf#155266 Eliminate delayed scrollbar redrawing when swiping
+ // By default, the layout idle timer in the InterimWindowItem class
+ // is set to TaskPriority::RESIZE. That is too high of a priority as
+ // it appears that other timers are drawing after the scrollbar has been
+ // redrawn.
+ // As a result, when swiping, the content moves fluidly but the scrollbar
+ // thumb does not move until after swiping stops or pauses. Then, after a
+ // short lag, the scrollbar thumb finally "jumps" to the expected
+ // position.
+ // So, to fix this scrollbar "stickiness" when swiping, setting the
+ // priority to TaskPriority::POST_PAINT causes the scrollbar to be
+ // redrawn after any competing timers.
+ rScrollBar.SetPriority(TaskPriority::POST_PAINT);
}
// Scroll-Timer