From 6389160f04322449c34bd1ecfe53983e3b588943 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 4 Feb 2015 14:55:57 +0100 Subject: [PATCH] D-Bus tray icons: save temp file with size 22px MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gnome Classic on Ubuntu shows this icon but fails to scale it down. So if we do not pre-scale the icon, it will be too wide, and cropped. Change-Id: If8cf98de3672deff77b99b17da5491bd6c45cfdb Reviewed-by: Jørgen Lind --- src/platformsupport/dbustray/qdbustrayicon.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp index d753e94698e..b38caf8ecce 100644 --- a/src/platformsupport/dbustray/qdbustrayicon.cpp +++ b/src/platformsupport/dbustray/qdbustrayicon.cpp @@ -145,12 +145,8 @@ QTemporaryFile *QDBusTrayIcon::tempIcon(const QIcon &icon) if (!necessary) return Q_NULLPTR; QTemporaryFile *ret = new QTemporaryFile(TempFileTemplate, this); - QSize tempSize; - Q_FOREACH (const QSize &size, icon.availableSizes()) - if (size.width() > tempSize.width()) - tempSize = size; ret->open(); - icon.pixmap(tempSize).save(ret); + icon.pixmap(QSize(22, 22)).save(ret); ret->close(); return ret; }