DolphinQt: Limit numeric widget width

This commit is contained in:
Mike Kuijl 2019-08-01 15:28:04 +02:00 committed by Kuijl
parent c70da390a7
commit cbfc442e90
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()); setFixedHeight(minimumSizeHint().height());
// Make sure that long entries don't throw our layout out of whack. // Make sure that long entries don't throw our layout out of whack.
setFixedWidth(112); setFixedWidth(WIDGET_MAX_WIDTH);
setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);

View File

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

View File

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