From 3793bae6c7bcd524b8ad15fb3c0bd119779fba8f Mon Sep 17 00:00:00 2001 From: Shrief Gabr Date: Wed, 12 Mar 2025 22:29:34 +0200 Subject: [PATCH] QmlDesigner: Use 'PointingHand' cursor for hyperlinks Also did tweaks to font size to maintain consistency across views. Fixes: QDS-14850 Change-Id: Ic755c928b4fa39e121f18f60a5690dc7411d6b08 Reviewed-by: Ali Kianian --- .../ContentLibraryEffectsView.qml | 7 ++++++- .../ContentLibraryMaterialsView.qml | 7 ++++++- .../ContentLibraryUserView.qml | 11 +++++++---- .../materialBrowserQmlSource/MaterialBrowser.qml | 2 ++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml index 87777c04463..8784eeae46d 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml @@ -130,7 +130,7 @@ HelperWidgets.ScrollView { } textFormat: Text.RichText color: StudioTheme.Values.themeTextColor - font.pixelSize: StudioTheme.Values.baseFontSize + font.pixelSize: StudioTheme.Values.mediumFontSize topPadding: 10 leftPadding: 10 rightPadding: 10 @@ -140,6 +140,11 @@ HelperWidgets.ScrollView { width: root.width onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D() + + HoverHandler { + enabled: infoText.hoveredLink + cursorShape: Qt.PointingHandCursor + } } } } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml index acdcdb21c9d..38307281999 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml @@ -135,7 +135,7 @@ HelperWidgets.ScrollView { } textFormat: Text.RichText color: StudioTheme.Values.themeTextColor - font.pixelSize: StudioTheme.Values.baseFontSize + font.pixelSize: StudioTheme.Values.mediumFontSize topPadding: 10 leftPadding: 10 rightPadding: 10 @@ -144,6 +144,11 @@ HelperWidgets.ScrollView { horizontalAlignment: Text.AlignHCenter onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D() + + HoverHandler { + enabled: infoText.hoveredLink + cursorShape: Qt.PointingHandCursor + } } } } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml index 2c371385dd1..4ee3af47f83 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml @@ -232,16 +232,19 @@ Item { } textFormat: Text.RichText color: StudioTheme.Values.themeTextColor - font.pixelSize: StudioTheme.Values.baseFontSize - topPadding: 10 - leftPadding: 10 - rightPadding: 10 + font.pixelSize: StudioTheme.Values.mediumFontSize + padding: 10 visible: infoText.text !== "" horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap width: root.width onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D() + + HoverHandler { + enabled: infoText.hoveredLink + cursorShape: Qt.PointingHandCursor + } } } } diff --git a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml index 6d935dc39f3..06f5d3c2063 100644 --- a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml +++ b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml @@ -245,6 +245,8 @@ Item { mouse.accepted = false } z: 1 + cursorShape: hint.hoveredLink ? Qt.PointingHandCursor + : Qt.ArrowCursor } MouseArea {