Some widgets may use exposedRect of style (e.g. QGraphicsWebView) and would fail
if no value was set (the default is 0,0). Suggestion by Andre Pedralho <andre.pedralho@openbossa.org>. svn path=/trunk/KDE/kdelibs/; revision=1063546
This commit is contained in:
parent
83c7bf0bd8
commit
53c47204af
@ -51,8 +51,9 @@ void ShadowFake::copyTarget(QGraphicsWidget *target)
|
|||||||
QPainter painter(photo);
|
QPainter painter(photo);
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
painter.fillRect(target->rect(), Qt::transparent);
|
painter.fillRect(target->rect(), Qt::transparent);
|
||||||
/* Does it need any special initialization for KDE? */
|
|
||||||
QStyleOptionGraphicsItem style;
|
QStyleOptionGraphicsItem style;
|
||||||
|
//XXX: some widgets follow exposedRect viewport (e.g. QGraphicsWebView)
|
||||||
|
style.exposedRect = target->boundingRect();
|
||||||
target->paint(&painter, &style, 0);
|
target->paint(&painter, &style, 0);
|
||||||
painter.end();
|
painter.end();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user