1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(Widget::updateIcons): fix the way systray icons are loaded

the system tray should no longer use a static icon when the xdg
application icons are named qtox.{png,svg}

this means the workaround https://bugs.archlinux.org/task/47910 done
downstream at arch linux shouldn't be necessary anymore.
related discussion in #2903
This commit is contained in:
Jason Papakostas 2016-04-04 10:39:56 -05:00
parent 218228b696
commit 90874a478f

View File

@ -445,8 +445,12 @@ void Widget::updateIcons()
status = QStringLiteral("offline");
}
QIcon ico = QIcon::fromTheme("qtox-" + status);
if (ico.isNull())
QIcon ico;
if (QIcon::hasThemeIcon("qtox-" + status))
{
ico = QIcon::fromTheme("qtox-" + status);
}
else
{
QString color = Settings::getInstance().getLightTrayIcon() ? "light" : "dark";
QString path = ":/img/taskbar/" + color + "/taskbar_" + status + ".svg";