Commit 13efbfca authored by Konrad Materka's avatar Konrad Materka Committed by Nate Graham

[XembedSNIProxy] Scale only big icons

Summary:
Do not scale up small icons to avoid quality detoriation. For small icons scaling should be done in SystemTray only. Currently XembedSNIProxy scales to 32x32, then SystemTray (usually) scales it down to 24x24.

BUG: 366047
FIXED-IN: 5.17.1

Test Plan:
I've run few applications with small icons:
  - keepassx (22x22)
  - liferea (16x16)
  - tuxguitar (16x16)

It looks much better without scaling in xemebdsniproxy.

Reviewers: davidedmundson, #plasma, #plasma_workspaces

Reviewed By: davidedmundson, #plasma, #plasma_workspaces

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24531
parent acf91005
......@@ -206,7 +206,7 @@ void SNIProxy::update()
int h = image.height();
m_pixmap = QPixmap::fromImage(image);
if (w != s_embedSize || h != s_embedSize) {
if (w > s_embedSize || h > s_embedSize) {
qCDebug(SNIPROXY) << "Scaling pixmap of window" << m_windowId << Title() << "from w*h" << w << h;
m_pixmap = m_pixmap.scaled(s_embedSize, s_embedSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
}
......
Markdown is supported
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