From d4227e75d08c8866300c3d2ccb7c5c06e4bbb107 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Thu, 14 Jan 2021 14:35:45 +0100 Subject: [PATCH] uiux(Glossary): make links behave the way they should Closes #1624 --- .../Profile/Sections/HelpContainer.qml | 55 +++++++++++++++---- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/HelpContainer.qml b/ui/app/AppLayouts/Profile/Sections/HelpContainer.qml index f6288b3802..94168ab40c 100644 --- a/ui/app/AppLayouts/Profile/Sections/HelpContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/HelpContainer.qml @@ -135,40 +135,71 @@ Item { StyledText { id: faqLink - text: `${qsTr("Frequently asked questions")}` + text: qsTr("Frequently asked questions") font.pixelSize: 15 - onLinkActivated: appMain.openLink(link) + color: Style.current.blue + anchors.topMargin: Style.current.bigPadding + anchors.top: parent.top + MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text + hoverEnabled: true + onEntered: { + parent.font.underline = true + } + onExited: { + parent.font.underline = false + } + onClicked: { + appMain.openLink("https://status.im/docs/FAQs.html") + } } } - StyledText { id: issueLink - text: `${qsTr("Submit a bug")}` + text: qsTr("Submit a bug") + font.pixelSize: 15 + color: Style.current.blue anchors.topMargin: Style.current.bigPadding anchors.top: faqLink.bottom - font.pixelSize: 15 - onLinkActivated: appMain.openLink(link) + MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text + hoverEnabled: true + onEntered: { + parent.font.underline = true + } + onExited: { + parent.font.underline = false + } + onClicked: { + appMain.openLink("https://github.com/status-im/nim-status-client/issues/new") + } } } StyledText { - text: `${qsTr("Request a feature")}` + text: qsTr("Request a feature") + font.pixelSize: 15 + color: Style.current.blue anchors.topMargin: Style.current.bigPadding anchors.top: issueLink.bottom - font.pixelSize: 15 - onLinkActivated: appMain.openLink(link) + MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text + hoverEnabled: true + onEntered: { + parent.font.underline = true + } + onExited: { + parent.font.underline = false + } + onClicked: { + appMain.openLink("https://discuss.status.im/c/features/51") + } } } }