mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +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);
|
m_iconPixmap = ImageUtil::loadSvg(iconString, ":/", iconSize, ratio);
|
||||||
|
|
||||||
update();
|
update();
|
||||||
|
|
||||||
|
emit iconChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundItem::refreshTips(const int volume, const bool force)
|
void SoundItem::refreshTips(const int volume, const bool force)
|
||||||
|
@ -39,6 +39,7 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void requestContextMenu() const;
|
void requestContextMenu() const;
|
||||||
|
void iconChanged() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
@ -57,6 +57,12 @@ void SoundPlugin::init(PluginProxyInterface *proxyInter)
|
|||||||
connect(m_soundDeviceWidget.data(), &SoundDevicesWidget::requestHide, this, [ this ] {
|
connect(m_soundDeviceWidget.data(), &SoundDevicesWidget::requestHide, this, [ this ] {
|
||||||
m_proxyInter->requestSetAppletVisible(this, QUICK_ITEM_KEY, false);
|
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()
|
void SoundPlugin::pluginStateSwitched()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user