Bug 165230 - Frame applet should scale images smoothly when displaying them
Summary: Frame applet should scale images smoothly when displaying them
Status: RESOLVED DUPLICATE of bug 163662
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-frame (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Anne-Marie Mahfouf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-28 20:29 UTC by David Benjamin
Modified: 2008-06-28 23:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***