This commit is contained in:
朱子楚\zhuzi 2024-04-23 19:33:05 +08:00
parent c7de653ba2
commit b8ef9169b9
3 changed files with 8 additions and 7 deletions

View File

@ -270,6 +270,8 @@ void FluFrameless::componentComplete() {
auto geometry = window()->screen()->availableGeometry();
RECT rect;
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.y = rect.top - offsetXY.x();
minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2;
@ -429,7 +431,6 @@ void FluFrameless::setHitTestVisible(QQuickItem *val) {
}
}
void FluFrameless::_setWindowTopmost(bool topmost) {
#ifdef Q_OS_WIN
HWND hwnd = reinterpret_cast<HWND>(window()->winId());

View File

@ -32,9 +32,9 @@ FluWindow {
}
}
}
function showDialog(){
var x = transientParent.x + (transientParent.width - width)/2
var y = transientParent.y + (transientParent.height - height)/2
function showDialog(offsetX=0,offsetY=0){
var x = transientParent.x + (transientParent.width - width)/2 + offsetX
var y = transientParent.y + (transientParent.height - height)/2 + offsetY
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
control.setGeometry(x,y,width,height)
control.visibility = Window.Windowed

View File

@ -32,9 +32,9 @@ FluWindow {
}
}
}
function showDialog(){
var x = transientParent.x + (transientParent.width - width)/2
var y = transientParent.y + (transientParent.height - height)/2
function showDialog(offsetX=0,offsetY=0){
var x = transientParent.x + (transientParent.width - width)/2 + offsetX
var y = transientParent.y + (transientParent.height - height)/2 + offsetY
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
control.setGeometry(x,y,width,height)
control.visibility = Window.Windowed