diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp index 7e2b8cab7..2c4babc75 100644 --- a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp +++ b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp @@ -28,6 +28,9 @@ #include <QApplication> #include <QLineEdit> #include <QPainter> +#ifdef Q_OS_MAC +#include <QProxyStyle> +#endif #include <QPushButton> #include <QStyleFactory> #include <QStyleOption> @@ -478,6 +481,21 @@ QObject* QStyleFacadeImp::widgetForPainter(QPainter* painter) return 0; } +#ifdef Q_OS_MAC +class QMacNonTransientScrollBarsProxyStyle : public QProxyStyle +{ +public: + QMacNonTransientScrollBarsProxyStyle(QStyle *bs) : QProxyStyle(bs) { } + + int styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *hret) const + { + if (sh == SH_ScrollBar_Transient) + return 0; + return baseStyle()->styleHint(sh, opt, w, hret); + } +}; +#endif // Q_OS_MAC + QStyle* QStyleFacadeImp::style() const { if (m_style) @@ -491,6 +509,10 @@ QStyle* QStyleFacadeImp::style() const if (!m_style) m_style = QApplication::style(); +#ifdef Q_OS_MAC + m_style = new QMacNonTransientScrollBarsProxyStyle(m_style); +#endif + return m_style; } |