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:
Stavros Kosmas
2026-02-28 21:41:51 +02:00
parent f898d75bf3
commit d09436cd1a
12 changed files with 148 additions and 79 deletions

View File

@@ -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);
}