1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

fix area calculation

This commit is contained in:
helywin 2019-09-15 20:37:53 +08:00
parent bfbbadd7cc
commit d495abe3b5

View File

@ -645,7 +645,7 @@ void CFloatingDockContainer::onMaximizeRequest()
auto minY = qMax(screenRect.top(), widgetRect.top());
auto maxX = qMin(screenRect.right(), widgetRect.right());
auto maxY = qMin(screenRect.bottom(), widgetRect.bottom());
auto area = minX < maxX && minY < maxY ? (maxX - minX) * (maxY * minY) : 0;
auto area = minX < maxX && minY < maxY ? (maxX - minX) * (maxY - minY) : 0;
if (area > maxArea)
{
maxArea = area;