Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8278 from Miksel12/qt-changes
DolphinQt: Limit numeric widget width
  • Loading branch information
stenzek committed Aug 4, 2019
2 parents 7de6b57 + cbfc442 commit d3151d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/Config/Mapping/MappingButton.cpp
Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp
Expand Up @@ -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));

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/Config/Mapping/MappingWidget.h
Expand Up @@ -10,6 +10,8 @@
#include <QString>
#include <QWidget>

constexpr int WIDGET_MAX_WIDTH = 112;

class ControlGroupBox;
class InputConfig;
class IOWindow;
Expand Down

0 comments on commit d3151d8

Please sign in to comment.