2
0
forked from Ivasoft/DSView

fix: Under Windows, DSView cannot be adjusted to a sufficiently large width between two screens.

This commit is contained in:
dreamsource-tai
2024-07-23 16:49:56 +08:00
parent 2cffbe800b
commit 66ed68ea17

View File

@@ -427,10 +427,12 @@ LRESULT CALLBACK WinNativeWidget::WndProc(HWND hWnd, UINT message, WPARAM wParam
QSize minimum = gw->minimumSize();
QSize sizeHint = gw->minimumSizeHint();
bool bNormal = self->IsNormalsized();
MINMAXINFO *mmi = reinterpret_cast<MINMAXINFO*>(lParam);
mmi->ptMinTrackSize.x = qFloor(qMax(minimum.width(), sizeHint.width()) * k);
mmi->ptMinTrackSize.y = qFloor(qMax(minimum.height(), sizeHint.height()) * k);
mmi->ptMaxTrackSize.x = maxWidth;
mmi->ptMaxTrackSize.x = bNormal ? maxWidth * 5 : maxWidth;
mmi->ptMaxTrackSize.y = maxHeight;
}
}