Fix icon uglyness by combining them on a transparent

background instead of setting an all-or-nothing mask.

svn path=/trunk/KDE/kdepim/; revision=752378
wilder-work
Jakob Petsovits 19 years ago
parent b181a9a22e
commit a374198d57
  1. 7
      headeritem.cpp

@ -214,23 +214,18 @@ QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
}
QPixmap res( width, height );
QBitmap mask( width, height );
res.fill( Qt::transparent );
QPainter resultPainter( &res );
QPainter maskPainter( &mask );
mask.clear();
// Paint all pixmaps of the list to the resulting pixmap
int x = 0;
for ( PixmapList::ConstIterator it = pixmaps.begin();
it != pixmaps.end(); ++it ) {
resultPainter.drawPixmap( x, ( height - (*it).height() ) / 2, *it );
maskPainter.drawPixmap( x, (height - (*it).height()) / 2, (*it).mask() );
x += (*it).width();
}
resultPainter.end();
maskPainter.end();
res.setMask( mask );
return res;
}

Loading…
Cancel
Save