diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-03 01:45:09 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-03 01:45:12 +0200 |
commit | 226dc914b397894539f5bbee0be5f49dd996b655 (patch) | |
tree | 87a8d7817f7a3695394796553d92214a68747faf | |
parent | Merge pull request #1330 from raven02/tlds (diff) | |
download | yuzu-226dc914b397894539f5bbee0be5f49dd996b655.tar yuzu-226dc914b397894539f5bbee0be5f49dd996b655.tar.gz yuzu-226dc914b397894539f5bbee0be5f49dd996b655.tar.bz2 yuzu-226dc914b397894539f5bbee0be5f49dd996b655.tar.lz yuzu-226dc914b397894539f5bbee0be5f49dd996b655.tar.xz yuzu-226dc914b397894539f5bbee0be5f49dd996b655.tar.zst yuzu-226dc914b397894539f5bbee0be5f49dd996b655.zip |
-rw-r--r-- | src/yuzu/configuration/configure_audio.cpp | 11 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_audio.h | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index 6ea59f2a3..f11aaa172 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp @@ -21,9 +21,8 @@ ConfigureAudio::ConfigureAudio(QWidget* parent) ui->output_sink_combo_box->addItem(sink_detail.id); } - connect(ui->volume_slider, &QSlider::valueChanged, [this] { - ui->volume_indicator->setText(tr("%1 %").arg(ui->volume_slider->sliderPosition())); - }); + connect(ui->volume_slider, &QSlider::valueChanged, this, + &ConfigureAudio::setVolumeIndicatorText); this->setConfiguration(); connect(ui->output_sink_combo_box, @@ -62,7 +61,11 @@ void ConfigureAudio::setConfiguration() { ui->audio_device_combo_box->setCurrentIndex(new_device_index); ui->volume_slider->setValue(Settings::values.volume * ui->volume_slider->maximum()); - ui->volume_indicator->setText(tr("%1 %").arg(ui->volume_slider->sliderPosition())); + setVolumeIndicatorText(ui->volume_slider->sliderPosition()); +} + +void ConfigureAudio::setVolumeIndicatorText(int percentage) { + ui->volume_indicator->setText(tr("%1%", "Volume percentage (e.g. 50%)").arg(percentage)); } void ConfigureAudio::applyConfiguration() { diff --git a/src/yuzu/configuration/configure_audio.h b/src/yuzu/configuration/configure_audio.h index 4f0af4163..069e79d56 100644 --- a/src/yuzu/configuration/configure_audio.h +++ b/src/yuzu/configuration/configure_audio.h @@ -26,6 +26,7 @@ public slots: private: void setConfiguration(); + void setVolumeIndicatorText(int percentage); std::unique_ptr<Ui::ConfigureAudio> ui; }; |