mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-22 10:40:10 +08:00
update
This commit is contained in:
parent
ecd13a9cca
commit
c9c737f2fc
@ -161,11 +161,11 @@ void FluFrameless::componentComplete() {
|
|||||||
if (!isCompositionEnabled()) {
|
if (!isCompositionEnabled()) {
|
||||||
offsetSize = 0;
|
offsetSize = 0;
|
||||||
}
|
}
|
||||||
if (!isMaximum) {
|
if (!isMaximum || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) {
|
||||||
clientRect->top = originalTop + offsetSize;
|
clientRect->top = originalTop + offsetSize;
|
||||||
clientRect->bottom = originalBottom;
|
clientRect->bottom = originalBottom - offsetSize;
|
||||||
clientRect->left = originalLeft;
|
clientRect->left = originalLeft + offsetSize;
|
||||||
clientRect->right = originalRight;
|
clientRect->right = originalRight - offsetSize;
|
||||||
}
|
}
|
||||||
_setMaximizeHovered(false);
|
_setMaximizeHovered(false);
|
||||||
*result = WVR_REDRAW;
|
*result = WVR_REDRAW;
|
||||||
@ -243,6 +243,12 @@ void FluFrameless::componentComplete() {
|
|||||||
return true;
|
return true;
|
||||||
} else if (uMsg == WM_GETMINMAXINFO) {
|
} else if (uMsg == WM_GETMINMAXINFO) {
|
||||||
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||||
|
minmaxInfo->ptMaxPosition.x = 0;
|
||||||
|
minmaxInfo->ptMaxPosition.y = 0;
|
||||||
|
minmaxInfo->ptMaxSize.x = 0;
|
||||||
|
minmaxInfo->ptMaxSize.y = 0;
|
||||||
|
#else
|
||||||
auto pixelRatio = window()->devicePixelRatio();
|
auto pixelRatio = window()->devicePixelRatio();
|
||||||
auto geometry = window()->screen()->availableGeometry();
|
auto geometry = window()->screen()->availableGeometry();
|
||||||
RECT rect;
|
RECT rect;
|
||||||
@ -251,6 +257,7 @@ void FluFrameless::componentComplete() {
|
|||||||
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
|
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
|
||||||
minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2;
|
minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2;
|
||||||
minmaxInfo->ptMaxSize.y = qRound(geometry.height() * pixelRatio) + offsetXY.y() * 2;
|
minmaxInfo->ptMaxSize.y = qRound(geometry.height() * pixelRatio) + offsetXY.y() * 2;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
} else if (uMsg == WM_NCRBUTTONDOWN) {
|
} else if (uMsg == WM_NCRBUTTONDOWN) {
|
||||||
if (wParam == HTCAPTION) {
|
if (wParam == HTCAPTION) {
|
||||||
|
Loading…
Reference in New Issue
Block a user