clear with transparency; a little better but not perfect yet

svn path=/trunk/KDE/kdelibs/; revision=895441
This commit is contained in:
Aaron J. Seigo 2008-12-10 18:52:26 +00:00
parent fda8cf20d7
commit b69d0722d8
2 changed files with 12 additions and 1 deletions

View File

@ -201,7 +201,6 @@ void Dialog::paintEvent(QPaintEvent *e)
p.setRenderHint(QPainter::Antialiasing);
p.setClipRect(e->rect());
p.setCompositionMode(QPainter::CompositionMode_Source);
p.fillRect(rect(), Qt::transparent);
d->background->paintFrame(&p);
//we set the resize handlers
@ -313,6 +312,17 @@ void Dialog::mouseReleaseEvent(QMouseEvent *event)
QWidget::mouseReleaseEvent(event);
}
bool Dialog::event(QEvent *event)
{
if (event->type() == QEvent::Paint) {
QPainter p(this);
p.setCompositionMode(QPainter::CompositionMode_Source);
p.fillRect(rect(), Qt::transparent);
}
return QWidget::event(event);
}
void Dialog::resizeEvent(QResizeEvent *e)
{
d->background->resizeFrame(e->size());

View File

@ -102,6 +102,7 @@ class PLASMA_EXPORT Dialog : public QWidget
* Reimplemented from QWidget
*/
void paintEvent(QPaintEvent *e);
bool event(QEvent *event);
void resizeEvent(QResizeEvent *e);
bool eventFilter(QObject *watched, QEvent *event);
void hideEvent (QHideEvent *event);