From eb521bfc7d3a05f900f6c81db25aa4cea572f064 Mon Sep 17 00:00:00 2001 From: sandman Date: Wed, 23 Oct 2002 21:34:09 +0000 Subject: fixed a transparency bug: every QWidget child in a QPopupMenu had a full transparent bg-pixmap --- (limited to 'noncore/styles/liquid/liquid.cpp') diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 4013981..eb1ec6e 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp @@ -127,18 +127,17 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) pixDict.insert(p->winId(), pix); - if (!p->inherits("QPopupMenu")) { + if ( !p->inherits("QPopupMenu")) p->setBackgroundPixmap(*pix); - QObjectList *ol = p-> queryList("QWidget"); - for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { - QWidget *wid = (QWidget *) it.current ( ); + QObjectList *ol = p-> queryList("QWidget"); + for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { + QWidget *wid = (QWidget *) it.current ( ); - wid-> setBackgroundPixmap(*pix); - wid-> setBackgroundOrigin(QWidget::ParentOrigin); - } - delete ol; - } + wid-> setBackgroundPixmap(*pix); + wid-> setBackgroundOrigin(QWidget::ParentOrigin); + } + delete ol; } } else if(ev->type() == QEvent::Hide){ @@ -147,17 +146,16 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) // qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); pixDict.remove(p->winId()); - if (!p->inherits("QPopupMenu")) { + if ( !p->inherits("QPopupMenu")) p->setBackgroundMode(QWidget::PaletteBackground); - QObjectList *ol = p-> queryList("QWidget"); - for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { - QWidget *wid = (QWidget *) it.current ( ); - - wid-> setBackgroundMode( QWidget::PaletteBackground ); - } - delete ol; + QObjectList *ol = p-> queryList("QWidget"); + for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { + QWidget *wid = (QWidget *) it.current ( ); + + wid-> setBackgroundMode( QWidget::PaletteBackground ); } + delete ol; } } return(false); -- cgit v0.9.0.2