UI: Display Sample Rate with proper formatting

master
Matt Gajownik 2019-10-19 19:05:00 +11:00
parent 156e2f3aec
commit acf2eae1e5
2 changed files with 6 additions and 6 deletions

View File

@ -3685,19 +3685,19 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="sampleRate"> <widget class="QComboBox" name="sampleRate">
<property name="currentText"> <property name="currentText">
<string notr="true">44.1khz</string> <string notr="true">44.1 kHz</string>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string>44.1khz</string> <string>44.1 kHz</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>48khz</string> <string>48 kHz</string>
</property> </property>
</item> </item>
</widget> </widget>

View File

@ -2189,9 +2189,9 @@ void OBSBasicSettings::LoadAudioSettings()
const char *str; const char *str;
if (sampleRate == 48000) if (sampleRate == 48000)
str = "48khz"; str = "48 kHz";
else else
str = "44.1khz"; str = "44.1 kHz";
int sampleRateIdx = ui->sampleRate->findText(str); int sampleRateIdx = ui->sampleRate->findText(str);
if (sampleRateIdx != -1) if (sampleRateIdx != -1)
@ -3253,7 +3253,7 @@ void OBSBasicSettings::SaveAudioSettings()
} }
int sampleRate = 44100; int sampleRate = 44100;
if (sampleRateStr == "48khz") if (sampleRateStr == "48 kHz")
sampleRate = 48000; sampleRate = 48000;
if (WidgetChanged(ui->sampleRate)) if (WidgetChanged(ui->sampleRate))