disabled autoFillBackground for central QLabel in preview mode, to have the correct window background painted. Remark: this is a minor (and safe) hack. This should be moved upstream into kwin/lib/kdecoration

svn path=/trunk/KDE/kdebase/workspace/; revision=1020608
icc-effect-5.14.5
Hugo Pereira Da Costa 2009-09-06 18:29:57 +00:00
parent 688fe7beff
commit 191a3dd8db
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include <KLocale>
#include <KColorUtils>
#include <QLabel>
#include <QPainter>
#include <QTextStream>
#include <QApplication>
@ -104,6 +105,20 @@ namespace Nitrogen
widget()->setAutoFillBackground( false );
initialized_ = true;
// in case of preview, one wants to make the label used
// for the central widget transparent. This allows one to have
// the correct background (with gradient) rendered
// Remark: this is minor (and safe) a hack.
// This should be moved upstream (into kwin/lib/kdecoration)
if( isPreview() )
{
QList<QLabel*> children( widget()->findChildren<QLabel*>() );
for( QList<QLabel*>::iterator iter = children.begin(); iter != children.end(); iter++ )
{ (*iter)->setAutoFillBackground( false ); }
}
resetConfiguration();
}