diff --git a/app/layouts/manager.cpp b/app/layouts/manager.cpp index 8ef2ec3dc..d3614a5fa 100644 --- a/app/layouts/manager.cpp +++ b/app/layouts/manager.cpp @@ -41,6 +41,7 @@ #include // KDE +#include #include #include @@ -210,14 +211,22 @@ void Manager::loadLayoutOnStartup(QString layoutName) //! Latte didn't close correctly, maybe a crash if (layouts.size() > 0) { - QMessageBox *msg = new QMessageBox(); - msg->setAttribute(Qt::WA_DeleteOnClose); - msg->setIcon(QMessageBox::Warning); - msg->setWindowTitle(i18n("Multiple Layouts Warning")); - msg->setText(i18n("Latte did not close properly in the previous session. The following layout(s) [%0] were updated for consistency!!!").arg(layouts.join(","))); - msg->setStandardButtons(QMessageBox::Ok); - - msg->open(); + QDialog* dialog = new QDialog(nullptr); + dialog->setObjectName("sorry"); + dialog->setAttribute(Qt::WA_DeleteOnClose); + + auto buttonbox = new QDialogButtonBox(QDialogButtonBox::Ok); + + KMessageBox::createKMessageBox(dialog, + buttonbox, + QMessageBox::Warning, + i18n("Multiple Layouts based on Activities mode did not close properly during the last session.

The following layout(s) [ %0 ] had to be updated for consistency!").arg(layouts.join(",")), + QStringList(), + QString(), + 0, + KMessageBox::NoExec, + QString()); + dialog->show(); } m_synchronizer->switchToLayout(layoutName);