Skip to content
Permalink
Browse files
Merge pull request #7917 from spycrab/issue_11628
Qt/AudioPane: Fix volume box not keeping consistent width
  • Loading branch information
spycrab committed Mar 21, 2019
2 parents fcd0dbe + d1f7f0f commit 8713a75
Showing 1 changed file with 2 additions and 0 deletions.
@@ -6,6 +6,7 @@

#include <QCheckBox>
#include <QComboBox>
#include <QFontMetrics>
#include <QFormLayout>
#include <QGridLayout>
#include <QGroupBox>
@@ -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);

0 comments on commit 8713a75

Please sign in to comment.