From 191a3dd8db9442294aec23b26cb9ef8f9835caf9 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sun, 6 Sep 2009 18:29:57 +0000 Subject: [PATCH] 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 --- clients/nitrogen/nitrogenclient.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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(); }