Don't crash when mousing over certain icons.
svn path=/trunk/kdebase/kwin/; revision=107192
This commit is contained in:
parent
550dbe5c84
commit
8939fcff13
1 changed files with 6 additions and 4 deletions
|
@ -521,10 +521,12 @@ void KDEDefaultButton::drawButton(QPainter *p)
|
||||||
|
|
||||||
// Intensify the image if required
|
// Intensify the image if required
|
||||||
if (isMouseOver) {
|
if (isMouseOver) {
|
||||||
QBitmap mask = *btnpix.mask();
|
const QBitmap* mask = btnpix.mask();
|
||||||
btnpix.detach();
|
if( mask != 0 ) {
|
||||||
btnpix = KPixmapEffect::intensity(btnpix, 0.8);
|
btnpix.detach();
|
||||||
btnpix.setMask( mask );
|
btnpix = KPixmapEffect::intensity(btnpix, 0.8);
|
||||||
|
btnpix.setMask( *mask );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Smooth scale the pixmap for small titlebars
|
// Smooth scale the pixmap for small titlebars
|
||||||
|
|
Loading…
Reference in a new issue