dhcpcd-qt: Use 22x22 png icon with system tray
authorRoy Marples <roy@marples.name>
Sun, 9 Aug 2020 07:36:14 +0000 (08:36 +0100)
committerRoy Marples <roy@marples.name>
Sun, 9 Aug 2020 07:36:14 +0000 (08:36 +0100)
SVG no longer renders with Qt5 :/

src/dhcpcd-qt/dhcpcd-qt.cpp

index 72ed924862a5c55240f63a978279413dde376ac2..b9cf703c5ed351776a4042a3ea9476b81e7ef3e9 100644 (file)
@@ -574,8 +574,12 @@ QIcon DhcpcdQt::getIcon(QString category, QString name)
 
        if (QIcon::hasThemeIcon(name))
                icon = QIcon::fromTheme(name);
-       else
-               icon = QIcon(ICONDIR "/hicolor/scalable/" + category + "/" + name + ".svg");
+       else {
+               /* For some reason, SVG no longer displays ... */
+               QString file = QString("%1/hicolor/22x22/%2/%3.png")
+                   .arg(ICONDIR, category, name);
+               icon = QIcon(file);
+       }
 
        return icon;
 }