1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Qt: fix input lag in pad settings

Looks like repainting stuff inside a resizeable layout is slow AF
This commit is contained in:
Megamouse 2020-08-04 15:10:23 +02:00
parent 25d73f5a70
commit 815d6f4223

View File

@ -238,6 +238,9 @@ pad_settings_dialog::pad_settings_dialog(std::shared_ptr<gui_settings> gui_setti
// Resize in order to fit into our scroll area
ResizeDialog();
// Restrict out inner layout size. This is necessary because redrawing things will slow down the dialog otherwise.
ui->mainLayout->setSizeConstraint(QLayout::SizeConstraint::SetFixedSize);
}
pad_settings_dialog::~pad_settings_dialog()
@ -1002,7 +1005,8 @@ void pad_settings_dialog::UpdateLabels(bool is_reset)
entry.second.text = qstr(entry.second.key);
}
m_padButtons->button(entry.first)->setText(entry.second.text);
// The button has to contain at least a space, because it would be square'ish otherwise
m_padButtons->button(entry.first)->setText(entry.second.text.isEmpty() ? QStringLiteral(" ") : entry.second.text);
}
}