mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-27 16:29:04 -04:00
UI: Display infinity symbol when volume is at 0 percent
This commit is contained in:
1 parent
15770712a8
commit
6da1df2ece
2 files changed
+11
-5
No files matched your search
@@ -74,9 +74,15 @@ void VolControl::SliderChanged(int vol)
|
||||
|
||||
void VolControl::updateText()
|
||||
{
|
||||
QString db = QString::number(obs_fader_get_db(obs_fader), 'f', 1)
|
||||
.append(" dB");
|
||||
volLabel->setText(db);
|
||||
QString text;
|
||||
float db = obs_fader_get_db(obs_fader);
|
||||
|
||||
if (db < -96.0f)
|
||||
text = "-" + QT_UTF8("\u221E") + " dB";
|
||||
else
|
||||
text = QString::number(db, 'f', 1).append(" dB");
|
||||
|
||||
volLabel->setText(text);
|
||||
|
||||
bool muted = obs_source_muted(source);
|
||||
const char *accTextLookup = muted ? "VolControl.SliderMuted"
|
||||
|
||||
Reference in new issue
Block a user