From 68fe20ddf637acc45e459f84d1619887e0501f4f Mon Sep 17 00:00:00 2001 From: Andrey Zaharow <59512038+andr13@users.noreply.github.com> Date: Sat, 17 Feb 2024 21:48:41 +0200 Subject: [PATCH] UI fixes (#596) UI fixes --- client/ui/qml/Pages2/PageSettingsApplication.qml | 1 + client/ui/qml/Pages2/PageStart.qml | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/ui/qml/Pages2/PageSettingsApplication.qml b/client/ui/qml/Pages2/PageSettingsApplication.qml index 6a3c077b..372cd69e 100644 --- a/client/ui/qml/Pages2/PageSettingsApplication.qml +++ b/client/ui/qml/Pages2/PageSettingsApplication.qml @@ -139,6 +139,7 @@ PageType { text: qsTr("Reset settings and remove all data from the application") rightImageSource: "qrc:/images/controls/chevron-right.svg" + textColor: "#EB5757" clickedFunction: function() { var headerText = qsTr("Reset settings and remove all data from the application?") diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index bd55827e..d7c63755 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -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)