Merge pull request #7917 from spycrab/issue_11628

Qt/AudioPane: Fix volume box not keeping consistent width
This commit is contained in:
spycrab 2019-03-21 14:41:49 +01:00 committed by GitHub
commit 8713a752f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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);