mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 03:10:10 +08:00
fix bug #440
This commit is contained in:
parent
4f2fcd8865
commit
38612f0ebc
@ -40,6 +40,7 @@ Window {
|
|||||||
property bool showStayTop: true
|
property bool showStayTop: true
|
||||||
property bool autoMaximize: false
|
property bool autoMaximize: false
|
||||||
property bool autoVisible: true
|
property bool autoVisible: true
|
||||||
|
property bool autoCenter: true
|
||||||
property bool useSystemAppBar
|
property bool useSystemAppBar
|
||||||
property color resizeBorderColor: {
|
property color resizeBorderColor: {
|
||||||
if(window.active){
|
if(window.active){
|
||||||
@ -69,11 +70,13 @@ Window {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
_realHeight = height
|
_realHeight = height
|
||||||
_realWidth = width
|
_realWidth = width
|
||||||
moveWindowToDesktopCenter()
|
useSystemAppBar = FluApp.useSystemAppBar
|
||||||
|
if(useSystemAppBar && autoCenter){
|
||||||
|
moveWindowToDesktopCenter()
|
||||||
|
}
|
||||||
fixWindowSize()
|
fixWindowSize()
|
||||||
lifecycle.onCompleted(window)
|
lifecycle.onCompleted(window)
|
||||||
initArgument(argument)
|
initArgument(argument)
|
||||||
useSystemAppBar = FluApp.useSystemAppBar
|
|
||||||
if(!useSystemAppBar){
|
if(!useSystemAppBar){
|
||||||
loader_frameless_helper.sourceComponent = com_frameless_helper
|
loader_frameless_helper.sourceComponent = com_frameless_helper
|
||||||
}
|
}
|
||||||
@ -125,7 +128,9 @@ Window {
|
|||||||
id:com_frameless_helper
|
id:com_frameless_helper
|
||||||
FluFramelessHelper{
|
FluFramelessHelper{
|
||||||
onLoadCompleted:{
|
onLoadCompleted:{
|
||||||
window.moveWindowToDesktopCenter()
|
if(autoCenter){
|
||||||
|
window.moveWindowToDesktopCenter()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,22 +270,22 @@ Window {
|
|||||||
FluWindowLifecycle{
|
FluWindowLifecycle{
|
||||||
id:lifecycle
|
id:lifecycle
|
||||||
}
|
}
|
||||||
// FluLoader{
|
FluLoader{
|
||||||
// id:loader_border
|
id:loader_border
|
||||||
// anchors.fill: parent
|
anchors.fill: parent
|
||||||
// sourceComponent: {
|
sourceComponent: {
|
||||||
// if(window.useSystemAppBar){
|
if(window.useSystemAppBar){
|
||||||
// return undefined
|
return undefined
|
||||||
// }
|
}
|
||||||
// if(FluTools.isWindows10OrGreater()){
|
if(FluTools.isWindows10OrGreater()){
|
||||||
// return undefined
|
return undefined
|
||||||
// }
|
}
|
||||||
// if(window.visibility == Window.Maximized || window.visibility == Window.FullScreen){
|
if(window.visibility == Window.Maximized || window.visibility == Window.FullScreen){
|
||||||
// return undefined
|
return undefined
|
||||||
// }
|
}
|
||||||
// return com_border
|
return com_border
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
function destoryOnClose(){
|
function destoryOnClose(){
|
||||||
lifecycle.onDestoryOnClose()
|
lifecycle.onDestoryOnClose()
|
||||||
|
@ -39,6 +39,7 @@ Window {
|
|||||||
property bool showStayTop: true
|
property bool showStayTop: true
|
||||||
property bool autoMaximize: false
|
property bool autoMaximize: false
|
||||||
property bool autoVisible: true
|
property bool autoVisible: true
|
||||||
|
property bool autoCenter: true
|
||||||
property bool useSystemAppBar
|
property bool useSystemAppBar
|
||||||
property color resizeBorderColor: {
|
property color resizeBorderColor: {
|
||||||
if(window.active){
|
if(window.active){
|
||||||
@ -68,11 +69,13 @@ Window {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
_realHeight = height
|
_realHeight = height
|
||||||
_realWidth = width
|
_realWidth = width
|
||||||
moveWindowToDesktopCenter()
|
useSystemAppBar = FluApp.useSystemAppBar
|
||||||
|
if(useSystemAppBar && autoCenter){
|
||||||
|
moveWindowToDesktopCenter()
|
||||||
|
}
|
||||||
fixWindowSize()
|
fixWindowSize()
|
||||||
lifecycle.onCompleted(window)
|
lifecycle.onCompleted(window)
|
||||||
initArgument(argument)
|
initArgument(argument)
|
||||||
useSystemAppBar = FluApp.useSystemAppBar
|
|
||||||
if(!useSystemAppBar){
|
if(!useSystemAppBar){
|
||||||
loader_frameless_helper.sourceComponent = com_frameless_helper
|
loader_frameless_helper.sourceComponent = com_frameless_helper
|
||||||
}
|
}
|
||||||
@ -124,7 +127,9 @@ Window {
|
|||||||
id:com_frameless_helper
|
id:com_frameless_helper
|
||||||
FluFramelessHelper{
|
FluFramelessHelper{
|
||||||
onLoadCompleted:{
|
onLoadCompleted:{
|
||||||
window.moveWindowToDesktopCenter()
|
if(autoCenter){
|
||||||
|
window.moveWindowToDesktopCenter()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -264,22 +269,22 @@ Window {
|
|||||||
FluWindowLifecycle{
|
FluWindowLifecycle{
|
||||||
id:lifecycle
|
id:lifecycle
|
||||||
}
|
}
|
||||||
// FluLoader{
|
FluLoader{
|
||||||
// id:loader_border
|
id:loader_border
|
||||||
// anchors.fill: parent
|
anchors.fill: parent
|
||||||
// sourceComponent: {
|
sourceComponent: {
|
||||||
// if(window.useSystemAppBar){
|
if(window.useSystemAppBar){
|
||||||
// return undefined
|
return undefined
|
||||||
// }
|
}
|
||||||
// if(FluTools.isWindows10OrGreater()){
|
if(FluTools.isWindows10OrGreater()){
|
||||||
// return undefined
|
return undefined
|
||||||
// }
|
}
|
||||||
// if(window.visibility == Window.Maximized || window.visibility == Window.FullScreen){
|
if(window.visibility == Window.Maximized || window.visibility == Window.FullScreen){
|
||||||
// return undefined
|
return undefined
|
||||||
// }
|
}
|
||||||
// return com_border
|
return com_border
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
function destoryOnClose(){
|
function destoryOnClose(){
|
||||||
lifecycle.onDestoryOnClose()
|
lifecycle.onDestoryOnClose()
|
||||||
|
Loading…
Reference in New Issue
Block a user