diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 21d05bf0f0..b29b670e41 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -278,14 +278,15 @@ game_list_frame::game_list_frame(std::shared_ptr guiSettings, std: { m_columnActs[col]->setCheckable(true); - connect(m_columnActs[col], &QAction::triggered, [this, col](bool val) + connect(m_columnActs[col], &QAction::triggered, [this, col](bool checked) { - if (!val) // be sure to have at least one column left so you can call the context menu at all time + if (!checked) // be sure to have at least one column left so you can call the context menu at all time { int c = 0; for (int i = 0; i < m_columnActs.count(); ++i) { - if (xgui_settings->GetGamelistColVisibility(i)) { if (++c > 1) { break; } } + if (xgui_settings->GetGamelistColVisibility(i) && ++c > 1) + break; } if (c < 2) { @@ -293,8 +294,14 @@ game_list_frame::game_list_frame(std::shared_ptr guiSettings, std: return; } } - m_gameList->setColumnHidden(col, !val); // Negate because it's a set col hidden and we have menu say show. - xgui_settings->SetGamelistColVisibility(col, val); + m_gameList->setColumnHidden(col, !checked); // Negate because it's a set col hidden and we have menu say show. + xgui_settings->SetGamelistColVisibility(col, checked); + + if (checked) // handle hidden columns that have zero width after showing them (stuck between others) + { + if (m_gameList->columnWidth(col) <= m_gameList->horizontalHeader()->minimumSectionSize()) + m_gameList->setColumnWidth(col, m_gameList->horizontalHeader()->minimumSectionSize()); + } }); } }