From 9349ad9383ec1d9221f0dfaa987f5a4dc7f1f891 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 17 Oct 2018 00:46:08 +0200 Subject: [PATCH] Fix missing icon --- src/core/qtsystemtrayicon.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/core/qtsystemtrayicon.cpp b/src/core/qtsystemtrayicon.cpp index 78ec01be3..d8463debf 100644 --- a/src/core/qtsystemtrayicon.cpp +++ b/src/core/qtsystemtrayicon.cpp @@ -46,20 +46,10 @@ QtSystemTrayIcon::QtSystemTrayIcon(QObject *parent) action_stop_after_this_track_(nullptr), action_mute_(nullptr) { - QIcon theme_icon = IconLoader::Load("strawberry", 48); - QIcon theme_icon_grey = theme_icon; + QIcon icon(":/icons/48x48/strawberry.png"); - if (theme_icon.isNull() || theme_icon_grey.isNull()) { - // Load the default icon - 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); - } + normal_icon_ = icon.pixmap(48, QIcon::Normal); + grey_icon_ = icon.pixmap(48, QIcon::Disabled); tray_->setIcon(normal_icon_); tray_->installEventFilter(this);