From 4acb3774e62962a2362da1f1b242e5d37aed5387 Mon Sep 17 00:00:00 2001 From: xboxones1 <91512529+xboxones1@users.noreply.github.com> Date: Sun, 10 Nov 2024 14:46:09 +0000 Subject: [PATCH] Hide status bar on WelcomeScreen --- src/gui/MainWindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index b9fcee3f2..20872d82a 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -679,6 +679,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() @@ -1159,8 +1164,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(); } } @@ -1269,8 +1276,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());