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,7 +229,11 @@ Window {
if (blurBehindWindowEnabled)
window.background = undefined
}
window.show()
if(window.autoMaximize){
window.showMaximized()
}else{
window.show()
}
}
}
WindowLifecycle{

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,7 +228,11 @@ Window {
if (blurBehindWindowEnabled)
window.background = undefined
}
window.show()
if(window.autoMaximize){
window.showMaximized()
}else{
window.show()
}
}
}
WindowLifecycle{