diff --git a/plugins/sound/sounditem.cpp b/plugins/sound/sounditem.cpp index 84a7f6912..8fa852ed8 100644 --- a/plugins/sound/sounditem.cpp +++ b/plugins/sound/sounditem.cpp @@ -208,6 +208,8 @@ void SoundItem::refreshIcon() m_iconPixmap = ImageUtil::loadSvg(iconString, ":/", iconSize, ratio); update(); + + emit iconChanged(); } void SoundItem::refreshTips(const int volume, const bool force) diff --git a/plugins/sound/sounditem.h b/plugins/sound/sounditem.h index 9ab51608d..49996e9fa 100644 --- a/plugins/sound/sounditem.h +++ b/plugins/sound/sounditem.h @@ -39,6 +39,7 @@ public: signals: void requestContextMenu() const; + void iconChanged() const; protected: void resizeEvent(QResizeEvent *e); diff --git a/plugins/sound/soundplugin.cpp b/plugins/sound/soundplugin.cpp index c8745f082..a7ba73484 100644 --- a/plugins/sound/soundplugin.cpp +++ b/plugins/sound/soundplugin.cpp @@ -57,6 +57,12 @@ void SoundPlugin::init(PluginProxyInterface *proxyInter) connect(m_soundDeviceWidget.data(), &SoundDevicesWidget::requestHide, this, [ this ] { m_proxyInter->requestSetAppletVisible(this, QUICK_ITEM_KEY, false); }); + + connect(m_soundItem.data(), &SoundItem::iconChanged, this, [=] { + m_proxyInter->updateDockInfo(this, DockPart::QuickPanel); + m_proxyInter->updateDockInfo(this, DockPart::QuickShow); + m_proxyInter->itemUpdate(this, SOUND_KEY); + }); } void SoundPlugin::pluginStateSwitched()