mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
Ref T731, correct UI audio messages
This commit is contained in:
committed by
Mat Sutcliffe
parent
4dbe1c49c8
commit
bcd97c3a60
@@ -105,7 +105,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
QString IContextAudio::audioRunsWhereInfo() const
|
QString IContextAudio::audioRunsWhereInfo() const
|
||||||
{
|
{
|
||||||
static const QString s = QStringLiteral("Local audio on '%1', '%2'.").arg(audioRunsWhere().getMachineName(), audioRunsWhere().getProcessName());
|
static const QString s = QStringLiteral("Audio on '%1', '%2'.").arg(audioRunsWhere().getMachineName(), audioRunsWhere().getProcessName());
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ namespace BlackGui
|
|||||||
|
|
||||||
if (audio)
|
if (audio)
|
||||||
{
|
{
|
||||||
ui->le_Info->setText(audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change.");
|
const QString ai = audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change.";
|
||||||
|
ui->le_Info->setText(ai);
|
||||||
|
ui->le_Info->setPlaceholderText(ai);
|
||||||
|
|
||||||
this->initAudioDeviceLists();
|
this->initAudioDeviceLists();
|
||||||
|
|
||||||
@@ -130,7 +132,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
int CAudioDeviceVolumeSetupComponent::getInValue(int from, int to) const
|
int CAudioDeviceVolumeSetupComponent::getInValue(int from, int to) const
|
||||||
{
|
{
|
||||||
const double r = ui->hs_VolumeIn->maximum() - ui->hs_VolumeIn->minimum();
|
const double r = ui->hs_VolumeIn->maximum() - ui->hs_VolumeIn->minimum();
|
||||||
const double tr = to - from;
|
const double tr = to - from;
|
||||||
return qRound(ui->hs_VolumeIn->value() / r * tr);
|
return qRound(ui->hs_VolumeIn->value() / r * tr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user