mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-25 20:31:35 +08:00
update FluWindowDialog
This commit is contained in:
parent
d655dc0141
commit
796be2a8f2
@ -10,6 +10,7 @@ FluWindow {
|
||||
autoVisible: false
|
||||
autoCenter: false
|
||||
autoDestory: true
|
||||
stayTop: true
|
||||
fixSize: true
|
||||
Loader{
|
||||
anchors.fill: parent
|
||||
@ -24,11 +25,19 @@ FluWindow {
|
||||
visible = false
|
||||
event.accepted = false
|
||||
}
|
||||
Connections{
|
||||
target: control.transientParent
|
||||
function onVisibilityChanged(){
|
||||
if(control.transientParent.visibility === Window.Hidden){
|
||||
control.visibility = Window.Hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
function showDialog(){
|
||||
var x = transientParent.x + (transientParent.width - width)/2
|
||||
var y = transientParent.y + (transientParent.height - height)/2
|
||||
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
||||
setGeometry(x,y,width,height)
|
||||
visible = true
|
||||
control.setGeometry(x,y,width,height)
|
||||
control.visible = true
|
||||
}
|
||||
}
|
||||
|
@ -25,11 +25,19 @@ FluWindow {
|
||||
visible = false
|
||||
event.accepted = false
|
||||
}
|
||||
Connections{
|
||||
target: control.transientParent
|
||||
function onVisibleChanged(){
|
||||
if(control.transientParent.visible === false){
|
||||
control.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
function showDialog(){
|
||||
var x = transientParent.x + (transientParent.width - width)/2
|
||||
var y = transientParent.y + (transientParent.height - height)/2
|
||||
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
||||
setGeometry(x,y,width,height)
|
||||
visible = true
|
||||
control.setGeometry(x,y,width,height)
|
||||
control.visible = true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user