Skip to content

Commit

Permalink
Hide status bar on WelcomeScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
xboxones1 authored and droidmonkey committed Nov 10, 2024
1 parent ca9b88f commit 1cb48a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,11 @@ MainWindow::MainWindow()

restoreConfigState();
updateMenuActionState();

// Check the current screen and hide the status bar if it is the WelcomeScreen
if (m_ui->stackedWidget->currentIndex() == WelcomeScreen) {
statusBar()->hide();
}
}

MainWindow::~MainWindow()
Expand Down Expand Up @@ -1155,8 +1160,10 @@ void MainWindow::switchToDatabases()
{
if (m_ui->tabWidget->currentIndex() == -1) {
m_ui->stackedWidget->setCurrentIndex(WelcomeScreen);
statusBar()->hide();
} else {
m_ui->stackedWidget->setCurrentIndex(DatabaseTabScreen);
statusBar()->show();
}
}

Expand Down Expand Up @@ -1265,8 +1272,10 @@ void MainWindow::databaseTabChanged(int tabIndex)
{
if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == WelcomeScreen) {
m_ui->stackedWidget->setCurrentIndex(DatabaseTabScreen);
statusBar()->show();
} else if (tabIndex == -1 && m_ui->stackedWidget->currentIndex() == DatabaseTabScreen) {
m_ui->stackedWidget->setCurrentIndex(WelcomeScreen);
statusBar()->hide();
}

m_actionMultiplexer.setCurrentObject(m_ui->tabWidget->currentDatabaseWidget());
Expand Down

0 comments on commit 1cb48a9

Please # to comment.