Merge pull request #8278 from Miksel12/qt-changes

DolphinQt: Limit numeric widget width
This commit is contained in:
Connor McLaughlin 2019-08-04 20:28:17 +10:00 committed by GitHub
commit d3151d8808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,7 @@ MappingButton::MappingButton(MappingWidget* parent, ControlReference* ref, bool
setFixedHeight(minimumSizeHint().height());
// Make sure that long entries don't throw our layout out of whack.
setFixedWidth(112);
setFixedWidth(WIDGET_MAX_WIDTH);
setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);

View File

@ -15,6 +15,8 @@ MappingDouble::MappingDouble(MappingWidget* parent, ControllerEmu::NumericSettin
setRange(m_setting.GetMinValue(), m_setting.GetMaxValue());
setDecimals(2);
setFixedWidth(WIDGET_MAX_WIDTH);
if (const auto ui_suffix = m_setting.GetUISuffix())
setSuffix(QStringLiteral(" ") + tr(ui_suffix));

View File

@ -10,6 +10,8 @@
#include <QString>
#include <QWidget>
constexpr int WIDGET_MAX_WIDTH = 112;
class ControlGroupBox;
class InputConfig;
class IOWindow;