From 178be387bbf264d9fa5084b0d5fcfa098ef7d981 Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Sat, 28 Apr 2018 18:53:32 +0200 Subject: [PATCH] Cursor pointer on link hover for richtexts --- components/Label.qml | 3 ++- components/LabelSubheader.qml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/Label.qml b/components/Label.qml index 11d43fa3..5b0a25c9 100644 --- a/components/Label.qml +++ b/components/Label.qml @@ -26,7 +26,7 @@ // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import QtQuick 2.0 +import QtQuick 2.5 import QtQuick.Layouts 1.1 import "../components" as MoneroComponents @@ -43,6 +43,7 @@ Item { property string fontFamily: "" property alias wrapMode: label.wrapMode property alias horizontalAlignment: label.horizontalAlignment + property alias hoveredLink: label.hoveredLink signal linkActivated() height: label.height * scaleRatio width: label.width * scaleRatio diff --git a/components/LabelSubheader.qml b/components/LabelSubheader.qml index 96274f4d..50288ecf 100644 --- a/components/LabelSubheader.qml +++ b/components/LabelSubheader.qml @@ -43,4 +43,10 @@ Label { color: MoneroComponents.Style.dividerColor opacity: MoneroComponents.Style.dividerOpacity } + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor + } }