Windows qpa: fix minimum allowed fixed height, width on windows

A window width constraint coded in Qt4.8 was accidentally applied
to the height in Qt5. Upon further review, it does not seem that
this constraint is needed, in any case. Different versions of
Windows have different minimum window widths (8.1 had 124px
instead of 112), and setting a smaller value seems to cause no
harm.

Task-number: QTBUG-32820
Change-Id: I21ad6d406abf7344aff54d32b41974265aa9ea81
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Dyami Caliri 2014-09-17 17:33:22 -07:00
parent 75e5ffe0f7
commit b08b536f20

View File

@ -770,9 +770,8 @@ void QWindowsGeometryHint::applyToMinMaxInfo(DWORD style, DWORD exStyle, MINMAXI
const int maximumHeight = qMax(maximumSize.height(), minimumSize.height());
if (maximumWidth < QWINDOWSIZE_MAX)
mmi->ptMaxTrackSize.x = maximumWidth + frameWidth;
// windows with title bar have an implicit size limit of 112 pixels
if (maximumHeight < QWINDOWSIZE_MAX)
mmi->ptMaxTrackSize.y = qMax(maximumHeight + frameHeight, 112);
mmi->ptMaxTrackSize.y = maximumHeight + frameHeight;
qCDebug(lcQpaWindows).nospace() << '<' << __FUNCTION__
<< " frame=" << margins << ' ' << frameWidth << ',' << frameHeight
<< " out " << *mmi;