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.setRenderHint(QPainter::Antialiasing);
|
||||||
p.setClipRect(e->rect());
|
p.setClipRect(e->rect());
|
||||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||||
p.fillRect(rect(), Qt::transparent);
|
|
||||||
d->background->paintFrame(&p);
|
d->background->paintFrame(&p);
|
||||||
|
|
||||||
//we set the resize handlers
|
//we set the resize handlers
|
||||||
@ -313,6 +312,17 @@ void Dialog::mouseReleaseEvent(QMouseEvent *event)
|
|||||||
QWidget::mouseReleaseEvent(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)
|
void Dialog::resizeEvent(QResizeEvent *e)
|
||||||
{
|
{
|
||||||
d->background->resizeFrame(e->size());
|
d->background->resizeFrame(e->size());
|
||||||
|
1
dialog.h
1
dialog.h
@ -102,6 +102,7 @@ class PLASMA_EXPORT Dialog : public QWidget
|
|||||||
* Reimplemented from QWidget
|
* Reimplemented from QWidget
|
||||||
*/
|
*/
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e);
|
||||||
|
bool event(QEvent *event);
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
bool eventFilter(QObject *watched, QEvent *event);
|
bool eventFilter(QObject *watched, QEvent *event);
|
||||||
void hideEvent (QHideEvent *event);
|
void hideEvent (QHideEvent *event);
|
||||||
|
Loading…
Reference in New Issue
Block a user