mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-22 19:00:07 +08:00
update
This commit is contained in:
parent
3bfe4dd12c
commit
cfb961408b
@ -167,14 +167,15 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
||||
return true;
|
||||
}else if(uMsg == WM_GETMINMAXINFO && QT_VERSION < QT_VERSION_CHECK(6,0,0)){
|
||||
MINMAXINFO* minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
||||
auto pixelRatio = _helper->window->devicePixelRatio();
|
||||
auto geometry = _helper->window->screen()->availableGeometry();
|
||||
RECT rect;
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
|
||||
int cx = rect.right - rect.left + offsetXY.x()*2;
|
||||
int cy = rect.bottom - rect.top + offsetXY.y()*2;
|
||||
minmaxInfo->ptMaxPosition.x = rect.left - offsetXY.x();
|
||||
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
|
||||
minmaxInfo->ptMaxSize.x = cx;
|
||||
minmaxInfo->ptMaxSize.y = cy;
|
||||
minmaxInfo->ptMaxSize.x = geometry.width()*pixelRatio + offsetXY.x() * 2;
|
||||
minmaxInfo->ptMaxSize.y = geometry.height()*pixelRatio + offsetXY.y() * 2;
|
||||
|
||||
}else if(uMsg == WM_NCRBUTTONDOWN){
|
||||
if (wParam == HTCAPTION) {
|
||||
_helper->showSystemMenu(QCursor::pos());
|
||||
|
Loading…
Reference in New Issue
Block a user