diff options
-rw-r--r-- | Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp b/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp index f89945771..d8c440b90 100644 --- a/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp +++ b/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp @@ -34,6 +34,8 @@ #include "ScrollView.h" #include "Scrollbar.h" +#include <QGuiApplication> + namespace WebCore { ScrollbarThemeQStyle::ScrollbarThemeQStyle() @@ -93,8 +95,10 @@ static QStyleFacadeOption initSliderStyleOption(ScrollbarThemeClient* scrollbar, opt.palette = widget->property("palette").value<QPalette>(); opt.rect = widget->property("rect").value<QRect>(); opt.direction = static_cast<Qt::LayoutDirection>(widget->property("layoutDirection").toInt()); - } else + } else { opt.state |= QStyleFacade::State_Active; + opt.direction = QGuiApplication::layoutDirection(); + } opt.state &= ~QStyleFacade::State_HasFocus; @@ -116,6 +120,8 @@ static QStyleFacadeOption initSliderStyleOption(ScrollbarThemeClient* scrollbar, opt.slider.singleStep = scrollbar->lineStep(); opt.slider.minimum = 0; opt.slider.maximum = qMax(0, scrollbar->maximum()); + if (opt.slider.orientation == Qt::Horizontal && opt.direction == Qt::RightToLeft) + opt.slider.upsideDown = true; ScrollbarPart pressedPart = scrollbar->pressedPart(); ScrollbarPart hoveredPart = scrollbar->hoveredPart(); if (pressedPart != NoPart) { |