-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 8 | ||||
-rw-r--r-- | noncore/styles/liquid/plugin.cpp | 2 |
2 files changed, 6 insertions, 4 deletions
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 @@ -122,15 +122,15 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) stripePixmap(*pix, p->colorGroup().button()); } else{ QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color); } - if (p->inherits("QPopupMenu")) pixDict.insert(p->winId(), pix); - else { + + if (!p->inherits("QPopupMenu")) { p->setBackgroundPixmap(*pix); QObjectList *ol = p-> queryList("QWidget"); for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { QWidget *wid = (QWidget *) it.current ( ); @@ -143,15 +143,14 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev) } else if(ev->type() == QEvent::Hide){ if(type == TransStippleBg || type == TransStippleBtn || type == Custom){ // qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); - if (p->inherits("QPopupMenu")) pixDict.remove(p->winId()); - else { + 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 ( ); @@ -842,12 +841,13 @@ void LiquidStyle::polish(QWidget *w) if(w->isTopLevel()){ return; } + if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame )) w-> setBackgroundOrigin ( QWidget::ParentOrigin ); if(w->inherits("QComboBox") || w->inherits("QLineEdit") || w->inherits("QRadioButton") || w->inherits("QCheckBox") || w->inherits("QScrollBar")) { w->installEventFilter(this); 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 @@ -106,6 +106,8 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } +// Hack for Retail Z experiments +extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } } |