Merge pull request #14548 from Dentomologist/tasinput_let_stickwidget_and_irwidget_shrink
TASInput: Let StickWidget and IRWidget shrink
This commit is contained in:
@@ -20,7 +20,12 @@ IRWidget::IRWidget(QWidget* parent) : QWidget(parent)
|
|||||||
"Right click to re-center it."));
|
"Right click to re-center it."));
|
||||||
|
|
||||||
// If the widget gets too small, it will get deformed.
|
// 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)
|
void IRWidget::SetX(u16 x)
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ class IRWidget : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit IRWidget(QWidget* parent);
|
explicit IRWidget(QWidget* parent);
|
||||||
|
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
static constexpr u16 IR_MIN_X = 0;
|
static constexpr u16 IR_MIN_X = 0;
|
||||||
static constexpr u16 IR_MIN_Y = 0;
|
static constexpr u16 IR_MIN_Y = 0;
|
||||||
static constexpr u16 IR_MAX_X = 1023;
|
static constexpr u16 IR_MAX_X = 1023;
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ StickWidget::StickWidget(QWidget* parent, u16 max_x, u16 max_y)
|
|||||||
"Right click to re-center it."));
|
"Right click to re-center it."));
|
||||||
|
|
||||||
// If the widget gets too small, it will get deformed.
|
// 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)
|
void StickWidget::SetX(u16 x)
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ class StickWidget : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit StickWidget(QWidget* parent, u16 width, u16 height);
|
explicit StickWidget(QWidget* parent, u16 width, u16 height);
|
||||||
|
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void ChangedX(u16 x);
|
void ChangedX(u16 x);
|
||||||
void ChangedY(u16 y);
|
void ChangedY(u16 y);
|
||||||
|
|||||||
Reference in New Issue
Block a user