Fix missing icon

This commit is contained in:
Jonas Kvinge
2018-10-17 00:46:08 +02:00
parent f686f00951
commit 9349ad9383

View File

@@ -46,20 +46,10 @@ QtSystemTrayIcon::QtSystemTrayIcon(QObject *parent)
action_stop_after_this_track_(nullptr), action_stop_after_this_track_(nullptr),
action_mute_(nullptr) { action_mute_(nullptr) {
QIcon theme_icon = IconLoader::Load("strawberry", 48); QIcon icon(":/icons/48x48/strawberry.png");
QIcon theme_icon_grey = theme_icon;
if (theme_icon.isNull() || theme_icon_grey.isNull()) { normal_icon_ = icon.pixmap(48, QIcon::Normal);
// Load the default icon grey_icon_ = icon.pixmap(48, QIcon::Disabled);
QIcon icon(":/icons/48x48/strawberry.png");
normal_icon_ = icon.pixmap(48, QIcon::Normal);
grey_icon_ = icon.pixmap(48, QIcon::Disabled);
}
else {
// Use the icons from the theme
normal_icon_ = theme_icon.pixmap(48);
grey_icon_ = theme_icon_grey.pixmap(48);
}
tray_->setIcon(normal_icon_); tray_->setIcon(normal_icon_);
tray_->installEventFilter(this); tray_->installEventFilter(this);