| Summary: | Frame applet should scale images smoothly when displaying them | ||
|---|---|---|---|
| Product: | [Unmaintained] plasma4 | Reporter: | David Benjamin <davidben> |
| Component: | widget-frame | Assignee: | Anne-Marie Mahfouf <annma> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Already done |
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());