mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix columns in cheat tree list not auto-sizing
This commit is contained in:
parent
05bb126af9
commit
53633b7279
|
@ -17,7 +17,6 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
: m_dialog(dialog)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
QtUtils::ResizeColumnsForTreeView(m_ui.cheatList, {300, 100, -1});
|
||||
|
||||
reloadList();
|
||||
|
||||
|
@ -90,6 +89,12 @@ void GameCheatSettingsWidget::disableAllCheats()
|
|||
si->Save();
|
||||
}
|
||||
|
||||
void GameCheatSettingsWidget::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
QtUtils::ResizeColumnsForTreeView(m_ui.cheatList, {320, 100, -1});
|
||||
}
|
||||
|
||||
void GameCheatSettingsWidget::setCheatEnabled(std::string name, bool enabled, bool save_and_reload_settings)
|
||||
{
|
||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
|
|
|
@ -28,9 +28,13 @@ class GameCheatSettingsWidget : public QWidget
|
|||
|
||||
public:
|
||||
GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
void disableAllCheats();
|
||||
~GameCheatSettingsWidget();
|
||||
|
||||
void disableAllCheats();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void onCheatListItemDoubleClicked(QTreeWidgetItem* item, int column);
|
||||
void onCheatListItemChanged(QTreeWidgetItem* item, int column);
|
||||
|
|
Loading…
Reference in New Issue