Qt: resize initial game list headers to minimal size if necessary

we do this on showing columns already
This commit is contained in:
Megamouse 2018-05-18 09:20:36 +02:00 committed by Ivan
parent 99c52a0d0c
commit 9269d8a370

View File

@ -192,6 +192,10 @@ void game_list_frame::LoadSettings()
bool vis = xgui_settings->GetGamelistColVisibility(col);
m_columnActs[col]->setChecked(vis);
m_gameList->setColumnHidden(col, !vis);
// handle columns that have zero width after showing them (stuck between others)
if (vis && m_gameList->columnWidth(col) <= m_gameList->horizontalHeader()->minimumSectionSize())
m_gameList->setColumnWidth(col, m_gameList->horizontalHeader()->minimumSectionSize());
}
m_gameList->horizontalHeader()->restoreState(m_gameList->horizontalHeader()->saveState());