From ee770257c585bcffd72a315ecd974f284cac3e03 Mon Sep 17 00:00:00 2001 From: Cuteivist Date: Fri, 30 Aug 2024 12:19:42 +0200 Subject: [PATCH] chore: Disable clicking on Betatag (#16207) --- ui/StatusQ/src/StatusQ/Components/StatusBetaTag.qml | 4 ++++ .../src/StatusQ/Components/StatusNavigationListItem.qml | 4 +++- ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml | 1 + ui/app/AppLayouts/Profile/panels/MenuPanel.qml | 2 ++ ui/app/AppLayouts/Profile/views/wallet/MainView.qml | 6 ++++++ ui/app/AppLayouts/Wallet/views/RightTabView.qml | 1 + 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusBetaTag.qml b/ui/StatusQ/src/StatusQ/Components/StatusBetaTag.qml index f2905ddc38..df0d916bd8 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusBetaTag.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusBetaTag.qml @@ -9,6 +9,9 @@ Rectangle { property color fgColor: Theme.palette.baseColor1 property alias tooltipText: tip.text + property alias cursorShape: hoverHandler.cursorShape + + readonly property bool hovered: hoverHandler.hovered implicitHeight: 20 implicitWidth: 36 @@ -32,5 +35,6 @@ Rectangle { HoverHandler { id: hoverHandler + enabled: root.visible } } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusNavigationListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusNavigationListItem.qml index de1e355abe..703db15618 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusNavigationListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusNavigationListItem.qml @@ -21,11 +21,13 @@ StatusListItem { statusListItemIcon.anchors.topMargin: 14 + highlighted: sensor.containsMouse + color: { if (selected) { return Theme.palette.statusNavigationListItem.selectedBackgroundColor } - return sensor.containsMouse ? + return highlighted ? Theme.palette.statusNavigationListItem.hoverBackgroundColor : Theme.palette.baseColor4 } diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml index 8527c6ce40..24ae94d49b 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml @@ -35,6 +35,7 @@ TabButton { visible: root.showBetaTag fgColor: root.checked ? Theme.palette.statusSwitchTab.selectedTextColor : Theme.palette.baseColor1 + cursorShape: hovered ? Qt.PointingHandCursor : undefined } } } diff --git a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml index 164f1346b0..d8160e852f 100644 --- a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml @@ -34,6 +34,7 @@ Column { title: model.text asset.name: model.icon selected: Global.settingsSubsection === model.subsection + highlighted: !!betaTagLoader.item && betaTagLoader.item.hovered onClicked: root.menuItemClicked(model) badge.value: { switch (model.subsection) { @@ -64,6 +65,7 @@ Column { sourceComponent: StatusBetaTag { tooltipText: betaTagLoader.experimentalTooltip + cursorShape: Qt.PointingHandCursor } } } diff --git a/ui/app/AppLayouts/Profile/views/wallet/MainView.qml b/ui/app/AppLayouts/Profile/views/wallet/MainView.qml index bfe9178e90..0596d08fa2 100644 --- a/ui/app/AppLayouts/Profile/views/wallet/MainView.qml +++ b/ui/app/AppLayouts/Profile/views/wallet/MainView.qml @@ -134,6 +134,7 @@ Column { title: qsTr("Account order") height: 64 width: parent.width + highlighted: accountOrderBetaTag.hovered onClicked: goToAccountOrderView() components: [ StatusIcon { @@ -143,10 +144,12 @@ Column { ] StatusBetaTag { + id: accountOrderBetaTag anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 125 tooltipText: qsTr("Under construction, you might experience some minor issues") + cursorShape: Qt.PointingHandCursor } } @@ -157,6 +160,7 @@ Column { title: qsTr("Manage Tokens") height: 64 width: parent.width + highlighted: manageTokensBetaTag.hovered onClicked: goToManageTokensView() components: [ StatusIcon { @@ -166,10 +170,12 @@ Column { ] StatusBetaTag { + id: manageTokensBetaTag anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 135 tooltipText: qsTr("Under construction, you might experience some minor issues") + cursorShape: Qt.PointingHandCursor } } diff --git a/ui/app/AppLayouts/Wallet/views/RightTabView.qml b/ui/app/AppLayouts/Wallet/views/RightTabView.qml index 21e313cfff..864b2ff9a3 100644 --- a/ui/app/AppLayouts/Wallet/views/RightTabView.qml +++ b/ui/app/AppLayouts/Wallet/views/RightTabView.qml @@ -129,6 +129,7 @@ RightTabBaseView { anchors.topMargin: 6 anchors.left: parent.right anchors.leftMargin: 5 + cursorShape: Qt.PointingHandCursor } } onCurrentIndexChanged: {