Bug 165230

Summary: Frame applet should scale images smoothly when displaying them
Product: [Unmaintained] plasma4 Reporter: David Benjamin <davidben>
Component: widget-frameAssignee: Anne-Marie Mahfouf <annma>
Status: RESOLVED DUPLICATE    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Benjamin 2008-06-28 20:29:01 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

Since the Frame applet's entire job is to display a picture, it probably should scale them smoothly when displaying them. This looks much better than a nearest-neighbor scale.

Also, is there a reason why the QPainter is allocated dynamically in that function? It gets deleted at the end anyway. (I didn't want to clutter the tiny diff with that change.)


Index: frame.cpp
===================================================================
--- frame.cpp	(revision 824074)
+++ frame.cpp	(working copy)
@@ -363,7 +363,7 @@
                                                     -m_swOutline, -m_swOutline); //Pretty useless.
     
     //TODO check if correct
-    QImage scaledImage = m_picture.scaled(frameRect.size(), Qt::KeepAspectRatio, Qt::FastTransformation);
+    QImage scaledImage = m_picture.scaled(frameRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
     frameRect = QRect(QPoint(frameRect.x() + (frameRect.width() - scaledImage.width()) / 2,
                       frameRect.y() + (frameRect.height() - scaledImage.height()) / 2), scaledImage.size());
Comment 1 Anne-Marie Mahfouf 2008-06-28 23:14:39 UTC
Already done
Comment 2 Anne-Marie Mahfouf 2008-06-28 23:15:34 UTC

*** This bug has been marked as a duplicate of 163662 ***