Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Commit 54c13f4

Browse files
Randy Krondavidedmundson
authored andcommitted
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 libnotificationshelperplugin.so {F5677396} Notification with patch applied {F5677397} Test Plan: Take screenshot with Spectacle with unpatched libnotificationshelperplugin.so installed and observe the blurry preview image in the notification. Install the patched libnotificationshelperplugin.so and restart plasmashell. 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: https://phabricator.kde.org/D10146
1 parent 1cb0d18 commit 54c13f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

applets/notifications/plugin/thumbnailer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ void Thumbnailer::generatePreview()
214214

215215
auto maxSize = qMax(m_size.width(), m_size.height());
216216
KIO::PreviewJob *job = KIO::filePreview(KFileItemList({KFileItem(m_url)}), QSize(maxSize,maxSize));
217+
job->setScaleType(KIO::PreviewJob::Scaled);
217218
job->setIgnoreMaximumSize(true);
218219

219220
connect(job, &KIO::PreviewJob::gotPreview, this, [this](const KFileItem &item, const QPixmap &preview) {

0 commit comments

Comments
 (0)