mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-20 09:24:59 -05:00
DolphinQt: Improve TAS UI Widgets
Made Stick and IR Widgets bigger Improved Stick and IR layouts to better utilize space Made Stick and IR Widgets Scale at a fixed ratio when window is resized Added Scrollbars to Stick and IR Widgets Reduced Spinbox padding in dark style
This commit is contained in:
@@ -30,3 +30,31 @@ void TASSpinBox::ApplyControllerValueChange()
|
||||
{
|
||||
setValue(m_state.ApplyControllerValueChange());
|
||||
}
|
||||
|
||||
QValidator::State TASSpinBox::validate(QString& input, int& pos) const
|
||||
{
|
||||
auto state = QSpinBox::validate(input, pos);
|
||||
if (state == QValidator::Invalid)
|
||||
{
|
||||
bool ok;
|
||||
input.toInt(&ok);
|
||||
if (ok)
|
||||
return QValidator::Intermediate;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void TASSpinBox::fixup(QString& input) const
|
||||
{
|
||||
bool ok;
|
||||
int val = input.toInt(&ok);
|
||||
if (ok)
|
||||
{
|
||||
if (val > maximum())
|
||||
input = QString::number(maximum());
|
||||
else if (val < minimum())
|
||||
input = QString::number(minimum());
|
||||
return;
|
||||
}
|
||||
QSpinBox::fixup(input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user