Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Mar 15, 2024
1 parent 7c4bedb commit a184e6b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ FluWindow {
property Component contentDelegate
autoVisible: false
autoCenter: false
autoDestory: false
autoDestory: true
fixSize: true
Loader{
anchors.fill: parent
sourceComponent: control.visible ? control.contentDelegate : undefined
sourceComponent: {
if(control.autoDestory){
return control.visible ? control.contentDelegate : undefined
}
return control.contentDelegate
}
}
closeListener: function(event){
event.accepted = true
}
function showDialog(){
var x = transientParent.x + (transientParent.width - width)/2
Expand Down
12 changes: 10 additions & 2 deletions src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ FluWindow {
property Component contentDelegate
autoVisible: false
autoCenter: false
autoDestory: false
autoDestory: true
fixSize: true
Loader{
anchors.fill: parent
sourceComponent: control.visible ? control.contentDelegate : undefined
sourceComponent: {
if(control.autoDestory){
return control.visible ? control.contentDelegate : undefined
}
return control.contentDelegate
}
}
closeListener: function(event){
event.accepted = true
}
function showDialog(){
var x = transientParent.x + (transientParent.width - width)/2
Expand Down

0 comments on commit a184e6b

Please sign in to comment.