class library: Spawner - don't access PriorityQueue-array
[supercollider.git] / QtCollider / style / ProxyStyle.cpp
blobbd4529ed114c8573434f9527acefa87b6045c220
1 #include "ProxyStyle.hpp"
3 #include <QWebView>
4 #include <QStyleOptionSlider>
5 #include <QPainter>
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();
20 p->save();
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 );
29 p->restore();
31 return;
34 QProxyStyle::drawComplexControl( ctrl, opt, p, w );