summaryrefslogtreecommitdiff
Unidiff
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
@@ -114,63 +114,61 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
114 else{ // tear off menu 114 else{ // tear off menu
115 pix->resize(p->width(), p->height()); 115 pix->resize(p->width(), p->height());
116 pix->fill(Qt::black.rgb()); 116 pix->fill(Qt::black.rgb());
117 } 117 }
118 if(type == TransStippleBg){ 118 if(type == TransStippleBg){
119 stripePixmap(*pix, p->colorGroup().background()); 119 stripePixmap(*pix, p->colorGroup().background());
120 } 120 }
121 else if(type == TransStippleBtn){ 121 else if(type == TransStippleBtn){
122 stripePixmap(*pix, p->colorGroup().button()); 122 stripePixmap(*pix, p->colorGroup().button());
123 } 123 }
124 else{ 124 else{
125 QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color); 125 QPixmapEffect::fade(*pix, (((float)opacity)+80)*0.01, color);
126 } 126 }
127 127
128 pixDict.insert(p->winId(), pix); 128 pixDict.insert(p->winId(), pix);
129 129
130 if (!p->inherits("QPopupMenu")) { 130 if ( !p->inherits("QPopupMenu"))
131 p->setBackgroundPixmap(*pix); 131 p->setBackgroundPixmap(*pix);
132 132
133 QObjectList *ol = p-> queryList("QWidget"); 133 QObjectList *ol = p-> queryList("QWidget");
134 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { 134 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
135 QWidget *wid = (QWidget *) it.current ( ); 135 QWidget *wid = (QWidget *) it.current ( );
136 136
137 wid-> setBackgroundPixmap(*pix); 137 wid-> setBackgroundPixmap(*pix);
138 wid-> setBackgroundOrigin(QWidget::ParentOrigin); 138 wid-> setBackgroundOrigin(QWidget::ParentOrigin);
139 } 139 }
140 delete ol; 140 delete ol;
141 }
142 } 141 }
143 } 142 }
144 else if(ev->type() == QEvent::Hide){ 143 else if(ev->type() == QEvent::Hide){
145 if(type == TransStippleBg || type == TransStippleBtn || 144 if(type == TransStippleBg || type == TransStippleBtn ||
146 type == Custom){ 145 type == Custom){
147// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); 146// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width());
148 147
149 pixDict.remove(p->winId()); 148 pixDict.remove(p->winId());
150 if (!p->inherits("QPopupMenu")) { 149 if ( !p->inherits("QPopupMenu"))
151 p->setBackgroundMode(QWidget::PaletteBackground); 150 p->setBackgroundMode(QWidget::PaletteBackground);
152 151
153 QObjectList *ol = p-> queryList("QWidget"); 152 QObjectList *ol = p-> queryList("QWidget");
154 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { 153 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
155 QWidget *wid = (QWidget *) it.current ( ); 154 QWidget *wid = (QWidget *) it.current ( );
156 155
157 wid-> setBackgroundMode( QWidget::PaletteBackground ); 156 wid-> setBackgroundMode( QWidget::PaletteBackground );
158 }
159 delete ol;
160 } 157 }
158 delete ol;
161 } 159 }
162 } 160 }
163 return(false); 161 return(false);
164} 162}
165 163
166 164
167LiquidStyle::LiquidStyle() 165LiquidStyle::LiquidStyle()
168 :QWindowsStyle() 166 :QWindowsStyle()
169{ 167{
170 setName ( "LiquidStyle" ); 168 setName ( "LiquidStyle" );
171 169
172 flatTBButtons = false; 170 flatTBButtons = false;
173 171
174 btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); 172 btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true);
175 btnMaskBmp.setMask(btnMaskBmp); 173 btnMaskBmp.setMask(btnMaskBmp);
176 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); 174 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true);