TASInput: Let StickWidget and IRWidget shrink

Use `sizeHint` instead of `setMinimumSize` to increase the default size
of `StickWidget` and `IRWidget`.

0531286906 doubled the initial sizes of
`StickWidget` and `IRWidget`, but using `setMinimumSize` to do so
prevented users from shrinking the widgets manually.

Resolves bugs.dolphin-emu.org/issues/14019.
This commit is contained in:
Dentomologist
2026-04-03 11:36:30 -07:00
parent d3b89b4c39
commit df37617975
4 changed files with 16 additions and 2 deletions
+6 -1
View File
@@ -20,7 +20,12 @@ IRWidget::IRWidget(QWidget* parent) : QWidget(parent)
"Right click to re-center it."));
// If the widget gets too small, it will get deformed.
setMinimumSize(QSize(128, 96));
setMinimumSize(QSize(64, 48));
}
QSize IRWidget::sizeHint() const
{
return QSize(128, 96);
}
void IRWidget::SetX(u16 x)
+2
View File
@@ -13,6 +13,8 @@ class IRWidget : public QWidget
public:
explicit IRWidget(QWidget* parent);
QSize sizeHint() const override;
static constexpr u16 IR_MIN_X = 0;
static constexpr u16 IR_MIN_Y = 0;
static constexpr u16 IR_MAX_X = 1023;
+6 -1
View File
@@ -21,7 +21,12 @@ StickWidget::StickWidget(QWidget* parent, u16 max_x, u16 max_y)
"Right click to re-center it."));
// If the widget gets too small, it will get deformed.
setMinimumSize(QSize(128, 128));
setMinimumSize(QSize(64, 64));
}
QSize StickWidget::sizeHint() const
{
return QSize(128, 128);
}
void StickWidget::SetX(u16 x)
+2
View File
@@ -13,6 +13,8 @@ class StickWidget : public QWidget
public:
explicit StickWidget(QWidget* parent, u16 width, u16 height);
QSize sizeHint() const override;
signals:
void ChangedX(u16 x);
void ChangedY(u16 y);