diff --git a/clients/nitrogen/nitrogenclient.cpp b/clients/nitrogen/nitrogenclient.cpp index 19f5134914..6a96ec2047 100644 --- a/clients/nitrogen/nitrogenclient.cpp +++ b/clients/nitrogen/nitrogenclient.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -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 children( widget()->findChildren() ); + for( QList::iterator iter = children.begin(); iter != children.end(); iter++ ) + { (*iter)->setAutoFillBackground( false ); } + + } + resetConfiguration(); }