Commit af3aef78 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: simple_prefs audio: Use defined values Fixes #3351

parent eadc598d
...@@ -310,6 +310,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -310,6 +310,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
#undef audioCommon #undef audioCommon
/* Audio Options */ /* Audio Options */
ui.volumeValue->setMaximum( QT_VOLUME_MAX / QT_VOLUME_DEFAULT * 100 );
CONFIG_GENERIC_NO_BOOL( "qt-startvolume" , IntegerRangeSlider, NULL, CONFIG_GENERIC_NO_BOOL( "qt-startvolume" , IntegerRangeSlider, NULL,
defaultVolume ); defaultVolume );
CONNECT( ui.defaultVolume, valueChanged( int ), CONNECT( ui.defaultVolume, valueChanged( int ),
...@@ -729,7 +730,7 @@ SPrefsPanel::~SPrefsPanel() ...@@ -729,7 +730,7 @@ SPrefsPanel::~SPrefsPanel()
void SPrefsPanel::updateAudioVolume( int volume ) void SPrefsPanel::updateAudioVolume( int volume )
{ {
qobject_cast<QSpinBox *>(optionWidgets[volLW]) qobject_cast<QSpinBox *>(optionWidgets[volLW])
->setValue( volume * 100 / 256 ); ->setValue( volume * 100 / QT_VOLUME_DEFAULT );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment