summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp32
1 files changed, 15 insertions, 17 deletions
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
@@ -106,79 +106,77 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
QRect deskR = QApplication::desktop()->rect();
if(r.right() > deskR.right() || r.bottom() > deskR.bottom()){
r.setBottom(deskR.bottom());
r.setRight(deskR.right());
}
*pix = QPixmap::grabWindow(QApplication::desktop()-> winId(), r.x(), r.y(),
r.width(), r.height());
}
else{ // tear off menu
pix->resize(p->width(), p->height());
pix->fill(Qt::black.rgb());
}
if(type == TransStippleBg){
stripePixmap(*pix, p->colorGroup().background());
}
else if(type == TransStippleBtn){
stripePixmap(*pix, p->colorGroup().button());
}
else{
QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color);
}
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){
if(type == TransStippleBg || type == TransStippleBtn ||
type == Custom){
// 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);
}
LiquidStyle::LiquidStyle()
:QWindowsStyle()
{
setName ( "LiquidStyle" );
flatTBButtons = false;
btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true);
btnMaskBmp.setMask(btnMaskBmp);
htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true);
htmlBtnMaskBmp.setMask(htmlBtnMaskBmp);
headerHoverID = -1;
highlightWidget = NULL;
setButtonDefaultIndicatorWidth(0);
btnDict.setAutoDelete(true);
bevelFillDict.setAutoDelete(true);
smallBevelFillDict.setAutoDelete(true);
customBtnColorList.setAutoDelete(true);