chore: Disable clicking on Betatag (#16207)

This commit is contained in:
Cuteivist 2024-08-30 12:19:42 +02:00 committed by GitHub
parent 5fa33249c7
commit ee770257c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 1 deletions

View File

@ -9,6 +9,9 @@ Rectangle {
property color fgColor: Theme.palette.baseColor1 property color fgColor: Theme.palette.baseColor1
property alias tooltipText: tip.text property alias tooltipText: tip.text
property alias cursorShape: hoverHandler.cursorShape
readonly property bool hovered: hoverHandler.hovered
implicitHeight: 20 implicitHeight: 20
implicitWidth: 36 implicitWidth: 36
@ -32,5 +35,6 @@ Rectangle {
HoverHandler { HoverHandler {
id: hoverHandler id: hoverHandler
enabled: root.visible
} }
} }

View File

@ -21,11 +21,13 @@ StatusListItem {
statusListItemIcon.anchors.topMargin: 14 statusListItemIcon.anchors.topMargin: 14
highlighted: sensor.containsMouse
color: { color: {
if (selected) { if (selected) {
return Theme.palette.statusNavigationListItem.selectedBackgroundColor return Theme.palette.statusNavigationListItem.selectedBackgroundColor
} }
return sensor.containsMouse ? return highlighted ?
Theme.palette.statusNavigationListItem.hoverBackgroundColor : Theme.palette.statusNavigationListItem.hoverBackgroundColor :
Theme.palette.baseColor4 Theme.palette.baseColor4
} }

View File

@ -35,6 +35,7 @@ TabButton {
visible: root.showBetaTag visible: root.showBetaTag
fgColor: root.checked ? Theme.palette.statusSwitchTab.selectedTextColor fgColor: root.checked ? Theme.palette.statusSwitchTab.selectedTextColor
: Theme.palette.baseColor1 : Theme.palette.baseColor1
cursorShape: hovered ? Qt.PointingHandCursor : undefined
} }
} }
} }

View File

@ -34,6 +34,7 @@ Column {
title: model.text title: model.text
asset.name: model.icon asset.name: model.icon
selected: Global.settingsSubsection === model.subsection selected: Global.settingsSubsection === model.subsection
highlighted: !!betaTagLoader.item && betaTagLoader.item.hovered
onClicked: root.menuItemClicked(model) onClicked: root.menuItemClicked(model)
badge.value: { badge.value: {
switch (model.subsection) { switch (model.subsection) {
@ -64,6 +65,7 @@ Column {
sourceComponent: StatusBetaTag { sourceComponent: StatusBetaTag {
tooltipText: betaTagLoader.experimentalTooltip tooltipText: betaTagLoader.experimentalTooltip
cursorShape: Qt.PointingHandCursor
} }
} }
} }

View File

@ -134,6 +134,7 @@ Column {
title: qsTr("Account order") title: qsTr("Account order")
height: 64 height: 64
width: parent.width width: parent.width
highlighted: accountOrderBetaTag.hovered
onClicked: goToAccountOrderView() onClicked: goToAccountOrderView()
components: [ components: [
StatusIcon { StatusIcon {
@ -143,10 +144,12 @@ Column {
] ]
StatusBetaTag { StatusBetaTag {
id: accountOrderBetaTag
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 125 anchors.leftMargin: 125
tooltipText: qsTr("Under construction, you might experience some minor issues") tooltipText: qsTr("Under construction, you might experience some minor issues")
cursorShape: Qt.PointingHandCursor
} }
} }
@ -157,6 +160,7 @@ Column {
title: qsTr("Manage Tokens") title: qsTr("Manage Tokens")
height: 64 height: 64
width: parent.width width: parent.width
highlighted: manageTokensBetaTag.hovered
onClicked: goToManageTokensView() onClicked: goToManageTokensView()
components: [ components: [
StatusIcon { StatusIcon {
@ -166,10 +170,12 @@ Column {
] ]
StatusBetaTag { StatusBetaTag {
id: manageTokensBetaTag
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 135 anchors.leftMargin: 135
tooltipText: qsTr("Under construction, you might experience some minor issues") tooltipText: qsTr("Under construction, you might experience some minor issues")
cursorShape: Qt.PointingHandCursor
} }
} }

View File

@ -129,6 +129,7 @@ RightTabBaseView {
anchors.topMargin: 6 anchors.topMargin: 6
anchors.left: parent.right anchors.left: parent.right
anchors.leftMargin: 5 anchors.leftMargin: 5
cursorShape: Qt.PointingHandCursor
} }
} }
onCurrentIndexChanged: { onCurrentIndexChanged: {