Fix centering dialogs
This commit is contained in:
parent
1d6d9e65af
commit
392a4be858
4 changed files with 13 additions and 21 deletions
|
|
@ -422,23 +422,19 @@ MainWindow::openCreateRoomDialog(
|
|||
showDialog(dialog);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue