Commit bfe2539a authored by Randy Kron's avatar Randy Kron Committed by David Edmundson
Browse files

Improve quality of images in notifications (Bug 385097)

BUG: 385097
FIXED-IN: 5.12.0

This patch to plasma-workspace is to improve the quality of images in notifications as reported in [[ | Bug 385097 ]].

It is still not perfect because KIO::PreviewJob is used to create the thumbnail, and it only produces two sizes, 128px and 256px, so it is likely that a small image will be scaled up, blurring it somewhat.

I took two screenshots of the same Dolphin window. Here is the before, without the patch:

And the after, with the patch:

Better, but still not perfect.

Test Plan: Take screenshots with Spectacle with and without the patched libnotificationshelperplugin library and observe the image quality in the notification. plasmashell must be restarted when the library file is changed for it to take effect.

Reviewers: #plasma_workspaces, #plasma, broulik

Reviewed By: #plasma_workspaces, #plasma, broulik

Subscribers: broulik, ngraham, plasma-devel, #plasma_workspaces, #plasma

Tags: #spectacle, #plasma

Differential Revision:
parent 562e5675
......@@ -212,7 +212,8 @@ void Thumbnailer::generatePreview()
KIO::PreviewJob *job = KIO::filePreview(KFileItemList({KFileItem(m_url)}), m_size);
auto maxSize = qMax(m_size.width(), m_size.height());
KIO::PreviewJob *job = KIO::filePreview(KFileItemList({KFileItem(m_url)}), QSize(maxSize,maxSize));
connect(job, &KIO::PreviewJob::gotPreview, this, [this](const KFileItem &item, const QPixmap &preview) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment