[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
wilder-5.17
Konrad Materka 7 years ago committed by Nate Graham
parent acf91005b6
commit 13efbfca67
  1. 2
      xembed-sni-proxy/sniproxy.cpp

@ -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);
}

Loading…
Cancel
Save