From 3eee9784f01a1d5b56ca735eb7ab8ab605d91f8c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 23 Oct 2017 12:39:27 +0200 Subject: Support links on all labels --- accounts/gmail/package/contents/ui/GmailSettings.qml | 6 ------ framework/qml/Label.qml | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/accounts/gmail/package/contents/ui/GmailSettings.qml b/accounts/gmail/package/contents/ui/GmailSettings.qml index 4fe6bc89..16f7dbf3 100644 --- a/accounts/gmail/package/contents/ui/GmailSettings.qml +++ b/accounts/gmail/package/contents/ui/GmailSettings.qml @@ -59,13 +59,7 @@ Item {
  • Visit https://myaccount.google.com/lesssecureapps and enable the setting to allow Kube to connect to your account." Layout.alignment: Qt.AlignCenter Layout.columnSpan: 2 - onLinkActivated: Qt.openUrlExternally(link) textFormat: Text.StyledText - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text - cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor - } } Kube.Label { diff --git a/framework/qml/Label.qml b/framework/qml/Label.qml index cc8235a3..850ed8ba 100644 --- a/framework/qml/Label.qml +++ b/framework/qml/Label.qml @@ -23,4 +23,11 @@ import org.kube.framework 1.0 as Kube T.Label { color: Kube.Colors.textColor font.family: Kube.Font.fontFamily + linkColor: Kube.Colors.highlightColor + onLinkActivated: Qt.openUrlExternally(link) + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor + } } -- cgit v1.2.3