From ef1010f312c613f1a7781a8affb709c02582a899 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 6 Mar 2014 15:26:05 +0100 Subject: [PATCH] set maximum size only when there is actually an hint --- src/declarativeimports/core/dialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index de72ea772..f542f9dae 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -734,9 +734,9 @@ void DialogProxy::updateMinimumHeight() void DialogProxy::updateMaximumWidth() { if (m_mainItemLayout) { - const int hint = m_mainItemLayout.data()->property("maximumWidth").toInt() + m_frameSvgItem->margins()->left() + m_frameSvgItem->margins()->right(); + const int hint = m_mainItemLayout.data()->property("maximumWidth").toInt(); if (hint > 0) { - setMaximumWidth(hint); + setMaximumWidth(hint + m_frameSvgItem->margins()->left() + m_frameSvgItem->margins()->right()); } else { setMaximumWidth(DIALOGSIZE_MAX); } @@ -748,9 +748,9 @@ void DialogProxy::updateMaximumWidth() void DialogProxy::updateMaximumHeight() { if (m_mainItemLayout) { - const int hint = m_mainItemLayout.data()->property("maximumHeight").toInt() + m_frameSvgItem->margins()->top() + m_frameSvgItem->margins()->bottom(); + const int hint = m_mainItemLayout.data()->property("maximumHeight").toInt(); if (hint > 0) { - setMaximumHeight(hint); + setMaximumHeight(hint + m_frameSvgItem->margins()->top() + m_frameSvgItem->margins()->bottom()); } else { setMaximumHeight(DIALOGSIZE_MAX); }