1 #include "ProxyStyle.hpp"
4 #include <QStyleOptionSlider>
7 using namespace QtCollider
;
9 void ProxyStyle::drawComplexControl ( ComplexControl ctrl
, const QStyleOptionComplex
*opt
,
10 QPainter
*p
, const QWidget
* w
) const
12 // FIXME this is a workaround for the WebKit bug #35681.
14 if( ctrl
== QStyle::CC_ScrollBar
15 && qobject_cast
<const QWebView
*>(w
) != 0
16 && opt
->type
== QStyleOption::SO_Slider
)
18 const QPoint topLeft
= opt
->rect
.topLeft();
21 p
->translate( topLeft
);
23 const QStyleOptionSlider
*optSlider
= static_cast<const QStyleOptionSlider
*>(opt
);
24 QStyleOptionSlider
opt2( *optSlider
);
25 opt2
.rect
.moveTo( QPoint(0, 0) );
27 QProxyStyle::drawComplexControl( ctrl
, &opt2
, p
, w
);
34 QProxyStyle::drawComplexControl( ctrl
, opt
, p
, w
);