UI fixes
This commit is contained in:
Andrey Zaharow 2024-02-17 21:48:41 +02:00 committed by GitHub
parent f640d4b5f5
commit 68fe20ddf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View file

@ -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)