clear with transparency; a little better but not perfect yet
svn path=/trunk/KDE/kdelibs/; revision=895441
This commit is contained in:
parent
fda8cf20d7
commit
b69d0722d8
12
dialog.cpp
12
dialog.cpp
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user