Compare commits

..

No commits in common. "8662eb97aa90ebdddd61ad27741f74c2fca80076" and "3b4c32752847a2fafd65d9ad2df4e87c40c9b76d" have entirely different histories.

6 changed files with 16 additions and 95 deletions

View File

@ -88,20 +88,6 @@ FluScrollablePage{
} }
} }
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 50
paddings: 10
FluCheckBox{
text:"fitsAppBarWindows"
checked: window.fitsAppBarWindows
anchors.verticalCenter: parent.verticalCenter
onClicked: {
window.fitsAppBarWindows = !window.fitsAppBarWindows
}
}
}
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
@ -229,4 +215,5 @@ FluScrollablePage{
} }
} }
} }
} }

View File

@ -41,11 +41,8 @@ FluWindow {
} }
} }
onFirstVisible: {
tour.open()
}
Component.onCompleted: { Component.onCompleted: {
tour.open()
checkUpdate(true) checkUpdate(true)
FluEventBus.registerEvent(event_checkupdate) FluEventBus.registerEvent(event_checkupdate)
} }
@ -242,7 +239,7 @@ FluWindow {
} }
function handleDarkChanged(button){ function handleDarkChanged(button){
if(!FluTheme.enableAnimation || window.fitsAppBarWindows === false){ if(!FluTheme.enableAnimation){
changeDark() changeDark()
}else{ }else{
loader_reveal.sourceComponent = com_reveal loader_reveal.sourceComponent = com_reveal

View File

@ -91,21 +91,6 @@ FluScrollablePage{
} }
} }
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 50
paddings: 10
FluCheckBox{
text:"fitsAppBarWindows"
checked: window.fitsAppBarWindows
anchors.verticalCenter: parent.verticalCenter
onClicked: {
window.fitsAppBarWindows = !window.fitsAppBarWindows
}
}
}
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 20 Layout.topMargin: 20
@ -232,4 +217,5 @@ FluScrollablePage{
} }
} }
} }
} }

View File

@ -44,11 +44,8 @@ FluWindow {
} }
} }
onFirstVisible: {
tour.open()
}
Component.onCompleted: { Component.onCompleted: {
tour.open()
checkUpdate(true) checkUpdate(true)
FluEventBus.registerEvent(event_checkupdate) FluEventBus.registerEvent(event_checkupdate)
} }
@ -245,7 +242,7 @@ FluWindow {
} }
function handleDarkChanged(button){ function handleDarkChanged(button){
if(!FluTheme.enableAnimation || window.fitsAppBarWindows === false){ if(!FluTheme.enableAnimation){
changeDark() changeDark()
}else{ }else{
loader_reveal.sourceComponent = com_reveal loader_reveal.sourceComponent = com_reveal

View File

@ -39,7 +39,6 @@ Window {
property bool showMaximize: true property bool showMaximize: true
property bool showStayTop: true property bool showStayTop: true
property bool useSystemAppBar property bool useSystemAppBar
property bool autoMaximize: false
property var closeListener: function(event){ property var closeListener: function(event){
if(closeDestory){ if(closeDestory){
destoryOnClose() destoryOnClose()
@ -49,7 +48,6 @@ Window {
} }
} }
signal initArgument(var argument) signal initArgument(var argument)
signal firstVisible()
id:window id:window
maximumWidth: useSystemAppBar&&fixSize ? width : 16777215 maximumWidth: useSystemAppBar&&fixSize ? width : 16777215
maximumHeight: useSystemAppBar&&fixSize ? height : 16777215 maximumHeight: useSystemAppBar&&fixSize ? height : 16777215
@ -66,26 +64,17 @@ Window {
d.changedStayTop() d.changedStayTop()
if(useSystemAppBar){ if(useSystemAppBar){
window.moveWindowToDesktopCenter() window.moveWindowToDesktopCenter()
if(window.autoMaximize){ window.visible = true
window.showMaximized()
}else{
window.show()
}
} }
} }
Component.onDestruction: { Component.onDestruction: {
lifecycle.onDestruction() lifecycle.onDestruction()
} }
onVisibleChanged: { onVisibleChanged: {
if(visible && d.isFirstVisible){
window.firstVisible()
d.isFirstVisible = false
}
lifecycle.onVisible(visible) lifecycle.onVisible(visible)
} }
QtObject{ QtObject{
id:d id:d
property bool isFirstVisible: true
function changedStayTop(){ function changedStayTop(){
function toggleStayTop(){ function toggleStayTop(){
if(window.stayTop){ if(window.stayTop){
@ -124,18 +113,13 @@ Window {
left: parent.left left: parent.left
right: parent.right right: parent.right
} }
sourceComponent: FluApp.useSystemAppBar ? undefined : com_app_bar sourceComponent: window.useSystemAppBar ? undefined : com_app_bar
} }
Component{ Component{
id:com_app_bar id:com_app_bar
Item{ Item{
data: window.appBar data: window.appBar
height: { height: window.fitsAppBarWindows ? 0 : childrenRect.height
if(FluApp.useSystemAppBar){
return 0
}
return window.fitsAppBarWindows ? 0 : childrenRect.height
}
} }
} }
Item{ Item{
@ -240,11 +224,7 @@ Window {
if (blurBehindWindowEnabled) if (blurBehindWindowEnabled)
window.background = undefined window.background = undefined
} }
if(window.autoMaximize){ window.show()
window.showMaximized()
}else{
window.show()
}
} }
} }
WindowLifecycle{ WindowLifecycle{
@ -254,7 +234,7 @@ Window {
id:loader_window_border id:loader_window_border
anchors.fill: parent anchors.fill: parent
z:999 z:999
sourceComponent: FluApp.useSystemAppBar ? undefined : com_window_border sourceComponent: window.useSystemAppBar ? undefined : com_window_border
} }
Component{ Component{
id:com_window_border id:com_window_border
@ -312,7 +292,4 @@ Window {
_pageRegister.onResult(data) _pageRegister.onResult(data)
} }
} }
function containerItem(){
return container
}
} }

View File

@ -38,7 +38,6 @@ Window {
property bool showMaximize: true property bool showMaximize: true
property bool showStayTop: true property bool showStayTop: true
property bool useSystemAppBar property bool useSystemAppBar
property bool autoMaximize: false
property var closeListener: function(event){ property var closeListener: function(event){
if(closeDestory){ if(closeDestory){
destoryOnClose() destoryOnClose()
@ -48,7 +47,6 @@ Window {
} }
} }
signal initArgument(var argument) signal initArgument(var argument)
signal firstVisible()
id:window id:window
maximumWidth: useSystemAppBar&&fixSize ? width : 16777215 maximumWidth: useSystemAppBar&&fixSize ? width : 16777215
maximumHeight: useSystemAppBar&&fixSize ? height : 16777215 maximumHeight: useSystemAppBar&&fixSize ? height : 16777215
@ -65,26 +63,17 @@ Window {
d.changedStayTop() d.changedStayTop()
if(useSystemAppBar){ if(useSystemAppBar){
window.moveWindowToDesktopCenter() window.moveWindowToDesktopCenter()
if(window.autoMaximize){ window.visible = true
window.showMaximized()
}else{
window.show()
}
} }
} }
Component.onDestruction: { Component.onDestruction: {
lifecycle.onDestruction() lifecycle.onDestruction()
} }
onVisibleChanged: { onVisibleChanged: {
if(visible && d.isFirstVisible){
window.firstVisible()
d.isFirstVisible = false
}
lifecycle.onVisible(visible) lifecycle.onVisible(visible)
} }
QtObject{ QtObject{
id:d id:d
property bool isFirstVisible: true
function changedStayTop(){ function changedStayTop(){
function toggleStayTop(){ function toggleStayTop(){
if(window.stayTop){ if(window.stayTop){
@ -123,18 +112,13 @@ Window {
left: parent.left left: parent.left
right: parent.right right: parent.right
} }
sourceComponent: FluApp.useSystemAppBar ? undefined : com_app_bar sourceComponent: window.useSystemAppBar ? undefined : com_app_bar
} }
Component{ Component{
id:com_app_bar id:com_app_bar
Item{ Item{
data: window.appBar data: window.appBar
height: { height: window.fitsAppBarWindows ? 0 : childrenRect.height
if(FluApp.useSystemAppBar){
return 0
}
return window.fitsAppBarWindows ? 0 : childrenRect.height
}
} }
} }
Item{ Item{
@ -239,11 +223,7 @@ Window {
if (blurBehindWindowEnabled) if (blurBehindWindowEnabled)
window.background = undefined window.background = undefined
} }
if(window.autoMaximize){ window.show()
window.showMaximized()
}else{
window.show()
}
} }
} }
WindowLifecycle{ WindowLifecycle{
@ -253,7 +233,7 @@ Window {
id:loader_window_border id:loader_window_border
anchors.fill: parent anchors.fill: parent
z:999 z:999
sourceComponent: FluApp.useSystemAppBar ? undefined : com_window_border sourceComponent: window.useSystemAppBar ? undefined : com_window_border
} }
Component{ Component{
id:com_window_border id:com_window_border
@ -311,7 +291,4 @@ Window {
_pageRegister.onResult(data) _pageRegister.onResult(data)
} }
} }
function containerItem(){
return container
}
} }