Initialize the mask bitmap before merging and align the icons horizontally centred.

Reviewed by Till Adam.

svn path=/trunk/kdepim/; revision=378797
wilder-work
Volker Krause 21 years ago
parent fb5738297b
commit f9e131a2e9
  1. 6
      headeritem.cpp

@ -200,13 +200,13 @@ QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
}
QPixmap res( width, height );
QBitmap mask( width, height );
QBitmap mask( width, height, true );
int x = 0;
for ( PixmapList::ConstIterator it = pixmaps.begin();
it != pixmaps.end(); ++it ) {
bitBlt( &res, x, 0, &(*it) );
bitBlt( &mask, x, 0, (*it).mask() );
bitBlt( &res, x, (height - (*it).height()) / 2, &(*it) );
bitBlt( &mask, x, (height - (*it).height()) / 2, (*it).mask() );
x += (*it).width();
}

Loading…
Cancel
Save