diff --git a/launcher/ui/dialogs/InstallLoaderDialog.cpp b/launcher/ui/dialogs/InstallLoaderDialog.cpp index c811e01eb..edac69e21 100644 --- a/launcher/ui/dialogs/InstallLoaderDialog.cpp +++ b/launcher/ui/dialogs/InstallLoaderDialog.cpp @@ -92,14 +92,18 @@ InstallLoaderDialog::InstallLoaderDialog(std::shared_ptr profile, c : QDialog(parent), profile(std::move(profile)), container(new PageContainer(this, QString(), this)), buttons(new QDialogButtonBox(this)) { auto layout = new QVBoxLayout(this); + // small margins look ugly on macOS on modal windows + #ifndef Q_OS_MACOS layout->setContentsMargins(0, 0, 0, 0); - + #endif container->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); layout->addWidget(container); auto buttonLayout = new QHBoxLayout(this); + // small margins look ugly on macOS on modal windows + #ifndef Q_OS_MACOS buttonLayout->setContentsMargins(0, 0, 6, 6); - + #endif auto refreshButton = new QPushButton(tr("&Refresh"), this); connect(refreshButton, &QPushButton::clicked, this, [this] { pageCast(container->selectedPage())->loadList(); }); buttonLayout->addWidget(refreshButton); diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp index 2fd0b8c7c..b7862b632 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp +++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp @@ -61,8 +61,10 @@ ResourceDownloadDialog::ResourceDownloadDialog(QWidget* parent, const std::share setWindowIcon(QIcon::fromTheme("new")); + // small margins look ugly on macOS on modal windows + #ifndef Q_OS_MACOS m_buttons.setContentsMargins(0, 0, 6, 6); - + #endif // Bonk Qt over its stupid head and make sure it understands which button is the default one... // See: https://stackoverflow.com/questions/24556831/qbuttonbox-set-default-button auto OkButton = m_buttons.button(QDialogButtonBox::Ok); @@ -116,7 +118,10 @@ void ResourceDownloadDialog::reject() // won't work with subclasses if we put it in this ctor. void ResourceDownloadDialog::initializeContainer() { + // small margins look ugly on macOS on modal windows + #ifndef Q_OS_MACOS layout()->setContentsMargins(0, 0, 0, 0); + #endif m_container = new PageContainer(this, {}, this); m_container->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding); diff --git a/launcher/ui/java/InstallJavaDialog.cpp b/launcher/ui/java/InstallJavaDialog.cpp index 938befe13..35541deb8 100644 --- a/launcher/ui/java/InstallJavaDialog.cpp +++ b/launcher/ui/java/InstallJavaDialog.cpp @@ -54,7 +54,6 @@ class InstallJavaPage : public QWidget, public BasePage { horizontalLayout = new QHBoxLayout(this); horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); horizontalLayout->setContentsMargins(0, 0, 0, 0); - majorVersionSelect = new VersionSelectWidget(this); majorVersionSelect->selectCurrent(); majorVersionSelect->setEmptyString(tr("No Java versions are currently available in the meta.")); @@ -187,13 +186,18 @@ InstallDialog::InstallDialog(const QString& uid, BaseInstance* instance, QWidget : QDialog(parent), container(new PageContainer(this, QString(), this)), buttons(new QDialogButtonBox(this)) { auto layout = new QVBoxLayout(this); + // small margins look ugly on macOS on modal windows + #ifndef Q_OS_MACOS layout->setContentsMargins(0, 0, 0, 0); - + #endif container->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); layout->addWidget(container); auto buttonLayout = new QHBoxLayout(this); + // small margins look ugly on macOS on modal windows + #ifndef Q_OS_MACOS buttonLayout->setContentsMargins(0, 0, 6, 6); + #endif auto refreshLayout = new QHBoxLayout(this);