mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 13:27:05 +08:00
update
This commit is contained in:
parent
993de241cb
commit
f04bc2951f
@ -81,10 +81,10 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
||||
return true;
|
||||
}
|
||||
int offsetSize = 0;
|
||||
bool isMax = IsZoomed(hwnd);
|
||||
bool isMaximum = IsZoomed(hwnd);
|
||||
offsetXY = QPoint(abs(clientRect->left - originalLeft),abs(clientRect->top - originalTop));
|
||||
if(isCompositionEnabled()){
|
||||
if(isMax){
|
||||
if(isMaximum){
|
||||
_helper->setOriginalPos(QPoint(originalLeft,originalTop));
|
||||
offsetSize = 0;
|
||||
}else{
|
||||
@ -96,9 +96,11 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
||||
}
|
||||
clientRect->top = originalTop+offsetSize;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
if(!isMaximum){
|
||||
clientRect->bottom = originalBottom-offsetSize;
|
||||
clientRect->left = originalLeft+offsetSize;
|
||||
clientRect->right = originalRight-offsetSize;
|
||||
}
|
||||
#endif
|
||||
*result = WVR_REDRAW;
|
||||
return true;
|
||||
|
@ -206,12 +206,13 @@ Window {
|
||||
}
|
||||
Item{
|
||||
id:layout_container
|
||||
property bool isMaximum : window.visibility == Window.Maximized
|
||||
anchors{
|
||||
fill:parent
|
||||
topMargin: _offsetXY.y
|
||||
bottomMargin: _offsetXY.y
|
||||
leftMargin: _offsetXY.x
|
||||
rightMargin: _offsetXY.x
|
||||
bottomMargin: isMaximum ? 0 : _offsetXY.y
|
||||
leftMargin: isMaximum ? 0 :_offsetXY.x
|
||||
rightMargin: isMaximum ? 0 : _offsetXY.x
|
||||
}
|
||||
onWidthChanged: {
|
||||
window.appBar.width = width
|
||||
|
Loading…
Reference in New Issue
Block a user