parent
f640d4b5f5
commit
68fe20ddf6
2 changed files with 9 additions and 2 deletions
|
@ -43,6 +43,8 @@ PageType {
|
|||
}
|
||||
|
||||
function onClosePage() {
|
||||
tabBar.isServerInfoShow = tabBarStackView.currentItem.objectName !== PageController.getPagePath(PageEnum.PageSettingsServerInfo)
|
||||
|
||||
if (tabBarStackView.depth <= 1) {
|
||||
return
|
||||
}
|
||||
|
@ -56,6 +58,8 @@ PageType {
|
|||
} else {
|
||||
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||
}
|
||||
|
||||
tabBar.isServerInfoShow = page === PageEnum.PageSettingsServerInfo || tabBar.isServerInfoShow
|
||||
}
|
||||
|
||||
function onGoToStartPage() {
|
||||
|
@ -134,6 +138,7 @@ PageType {
|
|||
var pagePath = PageController.getPagePath(page)
|
||||
tabBarStackView.clear(StackView.Immediate)
|
||||
tabBarStackView.replace(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||
tabBar.isServerInfoShow = false
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
|
@ -147,6 +152,7 @@ PageType {
|
|||
id: tabBar
|
||||
|
||||
property int previousIndex: 0
|
||||
property bool isServerInfoShow: false
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
|
@ -177,7 +183,7 @@ PageType {
|
|||
}
|
||||
|
||||
TabImageButtonType {
|
||||
isSelected: tabBar.currentIndex === 0
|
||||
isSelected: tabBar.isServerInfoShow ? false : tabBar.currentIndex === 0
|
||||
image: "qrc:/images/controls/home.svg"
|
||||
onClicked: {
|
||||
tabBarStackView.goToTabBarPage(PageEnum.PageHome)
|
||||
|
@ -211,7 +217,7 @@ PageType {
|
|||
}
|
||||
|
||||
TabImageButtonType {
|
||||
isSelected: tabBar.currentIndex === 2
|
||||
isSelected: tabBar.isServerInfoShow ? true : tabBar.currentIndex === 2
|
||||
image: "qrc:/images/controls/settings-2.svg"
|
||||
onClicked: {
|
||||
tabBarStackView.goToTabBarPage(PageEnum.PageSettings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue