Skip to content

Commit

Permalink
Qt: Put game scanning config in groupbox
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Oct 15, 2023
1 parent 86782e7 commit e6f1f6e
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 217 deletions.
14 changes: 11 additions & 3 deletions pcsx2-qt/Settings/GameListSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,19 @@ void GameListSettingsWidget::refreshExclusionList()
m_ui.excludedPaths->addItem(QString::fromStdString(path));
}

void GameListSettingsWidget::resizeEvent(QResizeEvent* event)
bool GameListSettingsWidget::event(QEvent* event)
{
QWidget::resizeEvent(event);
bool res = QWidget::event(event);

QtUtils::ResizeColumnsForTableView(m_ui.searchDirectoryList, {-1, 100});
switch (event->type())
{
case QEvent::LayoutRequest:
case QEvent::Resize:
QtUtils::ResizeColumnsForTableView(m_ui.searchDirectoryList, {-1, 100});
break;
}

return res;
}

void GameListSettingsWidget::addPathToTable(const std::string& path, bool recursive)
Expand Down
2 changes: 1 addition & 1 deletion pcsx2-qt/Settings/GameListSettingsWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private Q_SLOTS:
void onRescanAllGamesClicked();

protected:
void resizeEvent(QResizeEvent* event);
bool event(QEvent* event);

private:
void addPathToTable(const std::string& path, bool recursive);
Expand Down
Loading

0 comments on commit e6f1f6e

Please sign in to comment.