reverted to r1015361 because last commit was adressing the same issue (already fixed). Sorry
svn path=/trunk/KDE/kdebase/workspace/; revision=1018986
This commit is contained in:
parent
b4dcf3364d
commit
82aa125975
1 changed files with 12 additions and 16 deletions
|
@ -109,23 +109,19 @@ void KDecorationPreview::disablePreview()
|
|||
|
||||
void KDecorationPreview::paintEvent( QPaintEvent* e )
|
||||
{
|
||||
|
||||
QWidget::paintEvent(e);
|
||||
|
||||
// render existing decorations into a pixmap
|
||||
// there is some translations involved to make use of event.rect()
|
||||
// and optimize painting
|
||||
QRect rect( KDecorationPreview::rect().intersected( e->rect() ) );
|
||||
QPixmap pixmap( rect.size() );
|
||||
pixmap.fill( Qt::transparent );
|
||||
if( deco[Inactive] ) deco[Inactive]->widget()->render( &pixmap, deco[Inactive]->widget()->mapToParent( -rect.topLeft() ) );
|
||||
if( deco[Active] ) deco[Active]->widget()->render( &pixmap, deco[Active]->widget()->mapToParent( -rect.topLeft() ) );
|
||||
|
||||
// draw pixmap on widget
|
||||
QPainter painter( this );
|
||||
painter.setClipRect( e->rect() );
|
||||
painter.drawPixmap( rect.topLeft(), pixmap );
|
||||
QPoint delta = mapTo( window(), QPoint(0, 0) );
|
||||
|
||||
if ( deco[Inactive] )
|
||||
{
|
||||
QWidget *w = deco[Inactive]->widget();
|
||||
w->render( &painter, delta + w->mapToParent( QPoint(0, 0) ) );
|
||||
}
|
||||
if ( deco[Active] )
|
||||
{
|
||||
QWidget *w = deco[Active]->widget();
|
||||
w->render( &painter, delta + w->mapToParent( QPoint(0, 0) ) );
|
||||
}
|
||||
}
|
||||
|
||||
void KDecorationPreview::resizeEvent( QResizeEvent* e )
|
||||
|
|
Loading…
Reference in a new issue