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
This commit is contained in:
parent
688fe7beff
commit
191a3dd8db
1 changed files with 15 additions and 0 deletions
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue