From 6c5ffae459d7095760072481e19ab212e129c3a8 Mon Sep 17 00:00:00 2001 From: coolo Date: Tue, 11 Dec 2007 21:21:16 +0000 Subject: [PATCH] also work if there are two wizards layered over each other (which the installation for whatever reason does) git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@43001 e0cc52ee-31ee-0310-8b87-e83c4596d67c --- src/QY2Styler.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/QY2Styler.cc b/src/QY2Styler.cc index ba01fef..b5d05b3 100644 --- a/src/QY2Styler.cc +++ b/src/QY2Styler.cc @@ -72,14 +72,15 @@ bool QY2Styler::eventFilter( QObject * obj, QEvent * ev ) { QString back = _backgroundFn[ name ]; _backgroundPx[ name ] = QImage( back ); - wid->setAutoFillBackground( true ); qDebug( "loading %s for %s", qPrintable( back ), qPrintable( name ) ); } + wid->setAutoFillBackground( true ); + QPixmap result( wid->size() ); - if ( wid->contentsRect() != wid->rect() ) + if ( wid->contentsRect() != wid->rect() ) result.fill( QColor( 0, 128, 0, 0 ) ); - + QPainter pain( &result ); pain.drawImage( wid->contentsRect().topLeft(), _backgroundPx[name].scaled( wid->contentsRect().width(), wid->contentsRect().height() ) ); -- 2.39.2