mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: mute icon not sync changed
add signal
This commit is contained in:
parent
09b5434d3c
commit
c65ddcdbc9
@ -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)
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
|
||||
signals:
|
||||
void requestContextMenu() const;
|
||||
void iconChanged() const;
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user