* don't cache the painting; prevents blowing the pixmap cache and killing performance on large screens. we don't move this around anyways, and we only paint the exposed rect when using a bitmap wallpaper

* default to a bitmap wallpaper as we handle those a lot better (e.g. only painting the exposed rect)

the paper painting code really does need to move to DesktopContainment at some point =)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729228
This commit is contained in:
Aaron J. Seigo 2007-10-25 11:20:23 +00:00
parent b93fb635a2
commit 136363aefe

View File

@ -34,6 +34,7 @@
#include <KMimeType>
#include <KRun>
#include <KServiceTypeTrader>
#include <KStandardDirs>
#include "corona.h"
#include "phase.h"
@ -102,18 +103,18 @@ Containment::~Containment()
void Containment::init()
{
// setCachePaintMode(NoCacheMode);
setCachePaintMode(NoCacheMode);
setFlag(QGraphicsItem::ItemIsMovable, false);
setFlag(QGraphicsItem::ItemClipsChildrenToShape, false);
setAcceptDrops(true);
if (type() == DesktopContainment) {
KConfigGroup config(KGlobal::config(), "General");
d->wallpaperPath = config.readEntry("wallpaper", QString());
d->wallpaperPath = config.readEntry("wallpaper", KStandardDirs::locate("wallpaper", "plasma-default.png"));
//kDebug() << "wallpaperPath is" << d->wallpaperPath << QFile::exists(d->wallpaperPath);
kDebug() << "wallpaperPath is" << d->wallpaperPath << QFile::exists(d->wallpaperPath);
if (d->wallpaperPath.isEmpty() ||
!QFile::exists(d->wallpaperPath)) {
!QFile::exists(d->wallpaperPath)) {
kDebug() << "SVG wallpaper!";
d->background = new Plasma::Svg("widgets/wallpaper", this);
}