mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-22 19:00:07 +08:00
update
This commit is contained in:
parent
c7de653ba2
commit
b8ef9169b9
@ -270,6 +270,8 @@ void FluFrameless::componentComplete() {
|
|||||||
auto geometry = window()->screen()->availableGeometry();
|
auto geometry = window()->screen()->availableGeometry();
|
||||||
RECT rect;
|
RECT rect;
|
||||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
|
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
|
||||||
|
minmaxInfo->ptMinTrackSize.x = window()->minimumWidth() * pixelRatio + offsetXY.x();
|
||||||
|
minmaxInfo->ptMinTrackSize.y = window()->minimumHeight() * pixelRatio + offsetXY.y() + _appbar->height() * pixelRatio;
|
||||||
minmaxInfo->ptMaxPosition.x = rect.left - offsetXY.x();
|
minmaxInfo->ptMaxPosition.x = rect.left - offsetXY.x();
|
||||||
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;
|
||||||
@ -429,7 +431,6 @@ void FluFrameless::setHitTestVisible(QQuickItem *val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FluFrameless::_setWindowTopmost(bool topmost) {
|
void FluFrameless::_setWindowTopmost(bool topmost) {
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||||
|
@ -32,9 +32,9 @@ FluWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showDialog(){
|
function showDialog(offsetX=0,offsetY=0){
|
||||||
var x = transientParent.x + (transientParent.width - width)/2
|
var x = transientParent.x + (transientParent.width - width)/2 + offsetX
|
||||||
var y = transientParent.y + (transientParent.height - height)/2
|
var y = transientParent.y + (transientParent.height - height)/2 + offsetY
|
||||||
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
||||||
control.setGeometry(x,y,width,height)
|
control.setGeometry(x,y,width,height)
|
||||||
control.visibility = Window.Windowed
|
control.visibility = Window.Windowed
|
||||||
|
@ -32,9 +32,9 @@ FluWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showDialog(){
|
function showDialog(offsetX=0,offsetY=0){
|
||||||
var x = transientParent.x + (transientParent.width - width)/2
|
var x = transientParent.x + (transientParent.width - width)/2 + offsetX
|
||||||
var y = transientParent.y + (transientParent.height - height)/2
|
var y = transientParent.y + (transientParent.height - height)/2 + offsetY
|
||||||
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
||||||
control.setGeometry(x,y,width,height)
|
control.setGeometry(x,y,width,height)
|
||||||
control.visibility = Window.Windowed
|
control.visibility = Window.Windowed
|
||||||
|
Loading…
Reference in New Issue
Block a user