[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/proxy
From: Oliver Bausinger <bausi () everest ! mathematik ! uni-tuebingen ! de>
Date: 2003-11-24 18:36:49
[Download RAW message or body]
CVS commit by bausi:
kicker applet transparency fixes (#64707)
appletproxy:
- introduce a new dcop function to set the background pixmap
of an applet
- renamed / altered setBgMode() to repaintApplet() as this
better matches its new function
M +26 -6 appletproxy.cpp 1.27
M +2 -1 appletproxy.h 1.9
--- kdebase/kicker/proxy/appletproxy.cpp #1.26:1.27
@@ -136,4 +136,6 @@ AppletProxy::AppletProxy(QObject* parent
exit(0);
}
+
+ _bg = QPixmap();
}
@@ -181,7 +183,4 @@ void AppletProxy::loadApplet(const QCStr
}
- _applet->setBackgroundOrigin(QWidget::WindowOrigin);
- setBgMode(_applet);
-
// connect updateLayout signal
connect(_applet, SIGNAL(updateLayout()), SLOT(slotUpdateLayout()));
@@ -190,7 +189,8 @@ void AppletProxy::loadApplet(const QCStr
}
-void AppletProxy::setBgMode(QWidget* widget)
+void AppletProxy::repaintApplet(QWidget* widget)
{
- widget->setBackgroundMode(X11ParentRelative);
+ widget->repaint();
+
const QObjectList* children = widget->children();
@@ -206,5 +206,5 @@ void AppletProxy::setBgMode(QWidget* wid
if (w)
{
- setBgMode(w);
+ repaintApplet(w);
}
}
@@ -261,4 +261,6 @@ void AppletProxy::dock(const QCString& c
reply >> win;
+ // request background
+ dcop->send(appname, _callbackID, "getBackground()", data);
}
@@ -375,4 +377,22 @@ bool AppletProxy::process(const QCString
return true;
}
+ else if ( fun == "setBackground(QPixmap)" )
+ {
+ QDataStream dataStream( data, IO_ReadOnly );
+ dataStream >> _bg;
+ if(_applet)
+ if ( _bg.isNull() ) { // no transparency
+ _applet->unsetPalette();
+ _applet->repaint();
+ }
+ else { //transparency
+ _applet->blockSignals(true);
+ _applet->setBackgroundMode(Qt::FixedPixmap);
+ _applet->setPaletteBackgroundPixmap(_bg);
+ repaintApplet(_applet);
+ _applet->blockSignals(false);
+ }
+ return true;
+ }
return false;
}
--- kdebase/kicker/proxy/appletproxy.h #1.8:1.9
@@ -55,9 +55,10 @@ protected slots:
private:
- void setBgMode(QWidget* widget);
+ void repaintApplet(QWidget* widget);
AppletInfo *_info;
KPanelApplet *_applet;
QCString _callbackID;
+ QPixmap _bg;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic