summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/qt/ScrollbarQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/qt/ScrollbarQt.cpp')
-rw-r--r--Source/WebCore/platform/qt/ScrollbarQt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebCore/platform/qt/ScrollbarQt.cpp b/Source/WebCore/platform/qt/ScrollbarQt.cpp
index dda82e9..5afb1ae6 100644
--- a/Source/WebCore/platform/qt/ScrollbarQt.cpp
+++ b/Source/WebCore/platform/qt/ScrollbarQt.cpp
@@ -74,6 +74,11 @@ bool Scrollbar::contextMenu(const PlatformMouseEvent& event)
QAction* actionSelected = menu.exec(globalPos);
if (actionSelected == actScrollHere) {
+ // Set the pressed position to the middle of the thumb so that when we
+ // do move, the delta will be from the current pixel position of the
+ // thumb to the new position
+ int position = theme()->trackPosition(this) + theme()->thumbPosition(this) + theme()->thumbLength(this) / 2;
+ setPressedPos(position);
const QPoint pos = convertFromContainingWindow(event.pos());
moveThumb(horizontal ? pos.x() : pos.y());
} else if (actionSelected == actScrollTop)