Qt: Fix status bar toggle not saving

This commit is contained in:
Connor McLaughlin 2020-09-19 00:31:02 +10:00
parent 238152ae88
commit bdd98281fc
1 changed files with 5 additions and 1 deletions

View File

@ -326,8 +326,8 @@ void MainWindow::onViewToolbarActionToggled(bool checked)
void MainWindow::onViewStatusBarActionToggled(bool checked)
{
m_host_interface->SetBoolSettingValue("UI", "ShowStatusBar", checked);
m_ui.statusBar->setVisible(checked);
saveStateToConfig();
}
void MainWindow::onViewGameListActionTriggered()
@ -466,6 +466,10 @@ void MainWindow::setupAdditionalUi()
{
setWindowTitle(getWindowTitle());
const bool status_bar_visible = m_host_interface->GetBoolSettingValue("UI", "ShowStatusBar", true);
m_ui.actionViewStatusBar->setChecked(status_bar_visible);
m_ui.statusBar->setVisible(status_bar_visible);
m_game_list_widget = new GameListWidget(m_ui.mainContainer);
m_game_list_widget->initialize(m_host_interface);
m_ui.mainContainer->insertWidget(0, m_game_list_widget);