minor polishing of the Audio dialog

This commit is contained in:
thrust26 2018-07-11 21:22:52 +02:00
parent 22bd9ee262
commit 02085c1482
1 changed files with 7 additions and 5 deletions

View File

@ -47,6 +47,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
int xpos, ypos;
int lwidth = font.getStringWidth("Resampling quality "),
pwidth = font.getStringWidth("512 bytes");
WidgetArray wid;
VariantList items;
@ -121,14 +122,15 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 4;
// Param 1
myHeadroomSlider = new SliderWidget(this, font, xpos, ypos,
int swidth = pwidth+23;
myHeadroomSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
"Headroom ", 0, 0, 2 * fontWidth);
myHeadroomSlider->setMinValue(1); myHeadroomSlider->setMaxValue(AudioSettings::MAX_HEADROOM);
wid.push_back(myHeadroomSlider);
ypos += lineHeight + 4;
// Param 2
myBufferSizeSlider = new SliderWidget(this, font, xpos, ypos,
myBufferSizeSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
"Buffer size ", 0, 0, 2 * fontWidth);
myBufferSizeSlider->setMinValue(1); myBufferSizeSlider->setMaxValue(AudioSettings::MAX_BUFFER_SIZE);
wid.push_back(myBufferSizeSlider);