Skip to content

Commit

Permalink
Qt/AudioPane: Fix volume box not keeping consistent width
Browse files Browse the repository at this point in the history
  • Loading branch information
spycrab committed Mar 21, 2019
1 parent fcd0dbe commit d1f7f0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/Settings/AudioPane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <QCheckBox>
#include <QComboBox>
#include <QFontMetrics>
#include <QFormLayout>
#include <QGridLayout>
#include <QGroupBox>
Expand Down Expand Up @@ -65,6 +66,7 @@ void AudioPane::CreateWidgets()
m_volume_slider->setMaximum(100);

m_volume_indicator->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
m_volume_indicator->setFixedWidth(QFontMetrics(font()).boundingRect(tr("%1 %").arg(100)).width());

volume_layout->addWidget(m_volume_slider, 0, Qt::AlignHCenter);
volume_layout->addWidget(m_volume_indicator, 0, Qt::AlignHCenter);
Expand Down

0 comments on commit d1f7f0f

Please sign in to comment.