mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
feat: 声音悬停提示优化
设备静音时提示改为静音 Log: 修改声音插件悬停提示 Bug: https://pms.uniontech.com/zentao/bug-view-41252.html Change-Id: Ifed55d8f0b6b92000f5e2c9009390f1320297277 Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/1344 Reviewed-by: <mailman@uniontech.com> Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Tested-by: <mailman@uniontech.com>
This commit is contained in:
parent
dcb1ca25ad
commit
6560e767a6
@ -211,15 +211,14 @@ void SoundItem::refreshTips(const bool force)
|
||||
|
||||
QString value;
|
||||
if (m_sinkInter->mute()) {
|
||||
value = QString("0") + '%';
|
||||
m_tipsLabel->setText(QString(tr("Mute")));
|
||||
} else {
|
||||
if (m_sinkInter->volume() * 1000 < m_applet->volumeValue())
|
||||
value = QString::number(m_applet->volumeValue() / 10) + '%';
|
||||
else
|
||||
value = QString::number(m_sinkInter->volume() * 100) + '%';
|
||||
m_tipsLabel->setText(QString(tr("Volume %1").arg(value)));
|
||||
}
|
||||
|
||||
m_tipsLabel->setText(QString(tr("Volume %1").arg(value)));
|
||||
}
|
||||
|
||||
void SoundItem::sinkChanged(DBusSink *sink)
|
||||
|
Loading…
x
Reference in New Issue
Block a user