From e7168ff9fe61a8413d9dc5f7ffe10df843c16184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Thu, 8 Aug 2013 16:23:20 +0200 Subject: [PATCH] QMessageBox - merge some mac and non-mac code I have not located any significant behavior changes in this, and it is annoying having too much similar code in different branches. The main change is a removal of Qt::AlignLeft, but the icon Label should be in its own column. Change-Id: Iaf07fc503075e61e2af1a93d5fc9e6e34a24451d Reviewed-by: J-P Nurmi --- src/widgets/dialogs/qmessagebox.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 2467f07d91..65b623d7e9 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -300,22 +300,18 @@ void QMessageBoxPrivate::setupLayout() Q_Q(QMessageBox); delete q->layout(); QGridLayout *grid = new QGridLayout; -#ifndef Q_OS_MAC grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop); grid->addWidget(label, 0, 1, 1, 1); - // -- leave space for information label -- +#ifndef Q_OS_MAC grid->addWidget(buttonBox, 2, 0, 1, 2); #else + grid->addWidget(buttonBox, 3, 1, 1, 1); grid->setMargin(0); grid->setVerticalSpacing(8); grid->setHorizontalSpacing(0); q->setContentsMargins(24, 15, 24, 20); - grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop | Qt::AlignLeft); - grid->addWidget(label, 0, 1, 1, 1); - // -- leave space for information label -- grid->setRowStretch(1, 100); grid->setRowMinimumHeight(2, 6); - grid->addWidget(buttonBox, 3, 1, 1, 1); #endif grid->setSizeConstraint(QLayout::SetNoConstraint);