This commit is contained in:
zhuzichu 2023-11-27 15:29:54 +08:00
parent 2242ffc367
commit 5dd3320f66
2 changed files with 22 additions and 4 deletions

View File

@ -39,6 +39,7 @@ Window {
property bool showMaximize: true
property bool showStayTop: true
property bool useSystemAppBar
property bool autoMaximize: false
property var closeListener: function(event){
if(closeDestory){
destoryOnClose()
@ -64,7 +65,11 @@ Window {
d.changedStayTop()
if(useSystemAppBar){
window.moveWindowToDesktopCenter()
window.visible = true
if(window.autoMaximize){
window.showMaximized()
}else{
window.show()
}
}
}
Component.onDestruction: {
@ -224,9 +229,13 @@ Window {
if (blurBehindWindowEnabled)
window.background = undefined
}
if(window.autoMaximize){
window.showMaximized()
}else{
window.show()
}
}
}
WindowLifecycle{
id:lifecycle
}

View File

@ -38,6 +38,7 @@ Window {
property bool showMaximize: true
property bool showStayTop: true
property bool useSystemAppBar
property bool autoMaximize: false
property var closeListener: function(event){
if(closeDestory){
destoryOnClose()
@ -63,7 +64,11 @@ Window {
d.changedStayTop()
if(useSystemAppBar){
window.moveWindowToDesktopCenter()
window.visible = true
if(window.autoMaximize){
window.showMaximized()
}else{
window.show()
}
}
}
Component.onDestruction: {
@ -223,9 +228,13 @@ Window {
if (blurBehindWindowEnabled)
window.background = undefined
}
if(window.autoMaximize){
window.showMaximized()
}else{
window.show()
}
}
}
WindowLifecycle{
id:lifecycle
}