fix(macos): fix margins on macos

Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
This commit is contained in:
DioEgizio
2026-02-06 16:14:31 +01:00
parent 9171e2b2e1
commit b13f40df51
3 changed files with 18 additions and 5 deletions

View File

@@ -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);