From b637867f9e0ce70bced754f89fa9542f4a8db0a7 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 17 Apr 2023 21:13:13 +0200 Subject: [PATCH] MainWindow: Hide checkbox, set size, center rosetta warning --- src/core/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index 9d1b11d50..1eb522cd5 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -71,6 +71,7 @@ #include #include #include +#include #include #include "core/logging.h" @@ -1042,7 +1043,14 @@ MainWindow::MainWindow(Application *app, std::shared_ptr tray_ic if (Utilities::ProcessTranslated()) { QErrorMessage *error_message = new QErrorMessage; error_message->setAttribute(Qt::WA_DeleteOnClose); + error_message->resize(600, 220); + Utilities::CenterWidgetOnScreen(Utilities::GetScreen(this), error_message); error_message->showMessage(tr("It is detected that Strawberry is running under Rosetta. Strawberry currently have limited macOS support, and running Strawberry under Rosetta is unsupported and known to have issues. If you want to use Strawberry on the current CPU, you should build Strawberry from source. For instructions see.: https://wiki.strawberrymusicplayer.org/wiki/Compile")); + for (QObject *obj : error_message->children()) { + if (QCheckBox *checkbox = qobject_cast(obj)) { + checkbox->hide(); + } + } } #endif