--- a/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Thu Sep 02 20:26:45 2010 +0300
+++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Fri Sep 17 08:29:24 2010 +0300
@@ -1315,9 +1315,10 @@
//QImage share the memory occupied by data
QImage image(data, aBitmap->SizeInPixels().iWidth, aBitmap->SizeInPixels().iHeight, bytesPerLine, QImage::Format_RGB16);
- QPixmap pixmap = QPixmap::fromImage(image);
- pixmap = pixmap.scaled( itemWidth, itemHeight, Qt::KeepAspectRatio );
-
+ QPixmap pixmap = QPixmap::fromImage(image);
+ if ( aBitmap->SizeInPixels().iWidth > itemWidth || aBitmap->SizeInPixels().iHeight > itemHeight ) {
+ pixmap = pixmap.scaled( itemWidth, itemHeight, Qt::KeepAspectRatio );
+ }
aBitmap->UnlockHeap();
HbIcon* targetIcon = new HbIcon( QIcon( pixmap ) );