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 committed Nov 10, 2024
1 parent d03ffc2 commit 8bb0834
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 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,11 @@ void MainWindow::switchToDatabases()
{
if (m_ui->tabWidget->currentIndex() == -1) {
m_ui->stackedWidget->setCurrentIndex(WelcomeScreen);
statusBar()->hide();
} else {
m_ui->stackedWidget->setCurrentIndex(DatabaseTabScreen);
statusBar()->show();
statusBar()->setStyleSheet("");
}
}

Expand Down Expand Up @@ -1265,8 +1273,11 @@ void MainWindow::databaseTabChanged(int tabIndex)
{
if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == WelcomeScreen) {
m_ui->stackedWidget->setCurrentIndex(DatabaseTabScreen);
statusBar()->show();
statusBar()->setStyleSheet("");
} 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 8bb0834

Please # to comment.