From 923a6290c8cc93914d54e583f1d79a6bae638fab Mon Sep 17 00:00:00 2001 From: sandman Date: Mon, 08 Jul 2002 00:42:56 +0000 Subject: - Fix a memory leak (bg pixmaps for taskbar applets were never freed) - Try to be more intelligent about stipple alignment in child widgets (in every app I tested the stipple is now always aligned right) --- diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 67e53e9..fc925b8 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp @@ -125,9 +125,9 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color); } - if (p->inherits("QPopupMenu")) - pixDict.insert(p->winId(), pix); - else { + pixDict.insert(p->winId(), pix); + + if (!p->inherits("QPopupMenu")) { p->setBackgroundPixmap(*pix); QObjectList *ol = p-> queryList("QWidget"); @@ -146,10 +146,9 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) type == Custom){ // qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); - if (p->inherits("QPopupMenu")) - pixDict.remove(p->winId()); - else { - p->setBackgroundMode(QWidget::PaletteBackground); + pixDict.remove(p->winId()); + if (!p->inherits("QPopupMenu")) { + p->setBackgroundMode(QWidget::PaletteBackground); QObjectList *ol = p-> queryList("QWidget"); for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { @@ -845,7 +844,8 @@ void LiquidStyle::polish(QWidget *w) } - w-> setBackgroundOrigin ( QWidget::ParentOrigin ); + if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame )) + w-> setBackgroundOrigin ( QWidget::ParentOrigin ); if(w->inherits("QComboBox") || w->inherits("QLineEdit") || w->inherits("QRadioButton") || diff --git a/noncore/styles/liquid/plugin.cpp b/noncore/styles/liquid/plugin.cpp index f149c29..5f4c8e5 100644 --- a/noncore/styles/liquid/plugin.cpp +++ b/noncore/styles/liquid/plugin.cpp @@ -109,3 +109,5 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt return QS_OK; } +// Hack for Retail Z experiments +extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } } -- cgit v0.9.0.2