From 7d6e46d90af4115a1ec18edf75687b4adbd2c763 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 10 Dec 2021 15:36:55 +0600 Subject: [PATCH] Make "No ROMs found" message identical to Win32 --- src/qt/qt_main.cpp | 2 +- src/qt/qt_mainwindow.cpp | 1 + src/qt/qt_ui.cpp | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 1f0d3ea72..dbf752cc0 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) { pc_init(argc, argv); if (! pc_init_modules()) { - ui_msgbox_header(MBX_FATAL, VC(L"No ROMs found."), VC(L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.")); + ui_msgbox_header(MBX_FATAL, VC(L"No ROMs found."), VC(L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.")); return 6; } diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 5d51dc340..49578a594 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -864,6 +864,7 @@ void MainWindow::showMessage(const QString& header, const QString& message) { void MainWindow::showMessage_(const QString &header, const QString &message) { QMessageBox box(QMessageBox::Warning, header, message, QMessageBox::NoButton, this); + box.setTextFormat(Qt::TextFormat::RichText); box.exec(); } diff --git a/src/qt/qt_ui.cpp b/src/qt/qt_ui.cpp index a62a37de9..f53b80bad 100644 --- a/src/qt/qt_ui.cpp +++ b/src/qt/qt_ui.cpp @@ -63,7 +63,9 @@ int ui_msgbox_header(int flags, void *header, void* message) { // any error in early init if (main_window == nullptr) { - QMessageBox::critical(nullptr, hdr, msg); + QMessageBox msgBox(QMessageBox::Icon::Critical, hdr, msg); + msgBox.setTextFormat(Qt::TextFormat::RichText); + msgBox.exec(); } else { // else scope it to main_window main_window->showMessage(hdr, msg);