mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 20:15:27 +00:00
Qt: fix input lag in pad settings
Looks like repainting stuff inside a resizeable layout is slow AF
This commit is contained in:
parent
25d73f5a70
commit
815d6f4223
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue