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

Further improve quality of images in notifications

BUG: 385097

This revision further improves the quality of images in notifications
that was addressed in revision D9993. When I first looked into this, I
tried setting ScaleType on the PreviewJob but it had no effect. I found
that the preview images were being scaled to the small vertical size
that was requested, and this resulted in my first revision. I should
have tried setting ScaleType in addition.

Notification with unpatched


Notification with patch applied


Test Plan:
Take screenshot with Spectacle with unpatched  installed and observe the blurry
preview image in the notification.

Install the patched and restart

Take another screenshot with Spectacle and observe the much improved
quality of the preview image in the notification.

Reviewers: #plasma_workspaces, #plasma, broulik, ngraham

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

Tags: #plasma, #spectacle

Differential Revision:
parent 1cb0d180
......@@ -214,6 +214,7 @@ void Thumbnailer::generatePreview()
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