[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/shells/screensaver/containment
From:       Chani Armitage <chanika () gmail ! com>
Date:       2008-11-08 22:20:25
Message-ID: 1226182825.446364.31525.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 881743 by chani:

don't paint a background any more.
now I just need a way to configure the wallpaper plugin that's been magically \
painting itself behind the blackness all semester. :)


 M  +0 -40     desktop.cpp  
 M  +0 -11     desktop.h  


--- trunk/KDE/kdebase/workspace/plasma/shells/screensaver/containment/desktop.cpp \
#881742:881743 @@ -21,24 +21,15 @@
 
 #include <QAction>
 #include <QApplication>
-//#include <QDesktopWidget>
-#include <QGraphicsScene>
-#include <QGraphicsView>
-#include <QPainter>
 #include <QDBusConnection>
 #include <QDBusInterface>
 #include <QDBusMessage>
 
-//#include <KAuthorized>
 #include <KDebug>
-//#include <KWindowSystem>
-//#include <KActionCollection>
 #include <KConfigDialog>
 
 #include "plasma/corona.h"
 #include "plasma/theme.h"
-//#include "kworkspace/kworkspace.h"
-//#include "knewstuff2/engine.h"
 
 //TODO offer a way to change the theme and other such not-really-our-responsibility \
things  
@@ -137,37 +128,6 @@
     return actions;
 }
 
-void SaverDesktop::paintInterface(QPainter *painter,
-                                    const QStyleOptionGraphicsItem *option,
-                                    const QRect& contentsRect)
-{
-    //kDebug() << "paintInterface of background";
-
-    //TODO learn how the new wallpaper plugins work
-    painter->save();
-
-    if (painter->worldMatrix() == QMatrix()) {
-        // draw the background untransformed when possible;(saves lots of \
                per-pixel-math)
-        painter->resetTransform();
-    }
-
-    // blit the background (saves all the per-pixel-products that blending does)
-    painter->setCompositionMode(QPainter::CompositionMode_Source);
-
-    QColor color = Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor);
                
-    //FIXME should I use the contents rect or the exposed rect?
-    painter->fillRect(contentsRect, color);
-
-
-    // for pixmaps we draw only the exposed part (untransformed since the
-    // bitmapBackground already has the size of the viewport)
-    //painter->drawPixmap(option->exposedRect, m_bitmapBackground, \
                option->exposedRect);
-    //kDebug() << "draw pixmap of background to" << option->exposedRect;
-
-    // restore transformation and composition mode
-    painter->restore();
-}
-
 void SaverDesktop::toggleLock()
 {
     //requre a password to unlock
--- trunk/KDE/kdebase/workspace/plasma/shells/screensaver/containment/desktop.h \
#881742:881743 @@ -22,11 +22,8 @@
 
 #include <QList>
 #include <QObject>
-#include <QStyleOptionGraphicsItem>
 
 #include <plasma/containment.h>
-//#include <plasma/animator.h>
-//#include <plasma/widgets/widget.h>
 
 class QAction;
 class QDBusMessage;
@@ -50,14 +47,6 @@
     void constraintsEvent(Plasma::Constraints constraints);
     QList<QAction*> contextualActions();
 
-    /**
-     * Paints a default background colour. Nothing fancy, but that's what plugins
-     * are for. Reimplemented from Plasma::Containment;
-     */
-    void paintInterface(QPainter *painter,
-                        const QStyleOptionGraphicsItem *option,
-                        const QRect& contentsRect);
-
 signals:
     void locked();
     void unlocked();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic