diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-01-29 19:07:27 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-01-29 19:07:27 +0100 |
commit | 392a4be858a9ba1d1870041f726e05501bf65c4e (patch) | |
tree | 298d57575e6888d8e7024ecf07af60b495f6298f /src/MainWindow.cpp | |
parent | 1d6d9e65af7b78cb9fa1b68238f1b488b085ddfd (diff) |
Fix centering dialogs
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r-- | src/MainWindow.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index ab2de2ba..a4661da7 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -423,22 +423,18 @@ MainWindow::openCreateRoomDialog( } bool -MainWindow::hasActiveDialogs() const -{ - return false; -} - -bool MainWindow::pageSupportsTray() const { - return false; //! welcome_page_->isVisible() && !login_page_->isVisible() && - //! !register_page_->isVisible(); + return !http::client()->access_token().empty(); } inline void MainWindow::showDialog(QWidget *dialog) { - // utils::centerWidget(dialog, this); + dialog->setWindowFlags(Qt::WindowType::Dialog | Qt::WindowType::WindowCloseButtonHint | + Qt::WindowType::WindowTitleHint); dialog->raise(); dialog->show(); + utils::centerWidget(dialog, this); + dialog->window()->windowHandle()->setTransientParent(this); } |