ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp
changeset 62 36d93b4dc635
parent 52 a3a4c0de738e
child 65 ccee5c4b0de4
--- a/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp	Mon Aug 23 18:06:16 2010 +0530
+++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp	Sat Sep 04 11:36:24 2010 +0530
@@ -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 ) );