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 <ali.kianian@qt.io>
This commit is contained in:
Shrief Gabr
2025-03-12 22:29:34 +02:00
parent 861c8f0266
commit 3793bae6c7
4 changed files with 21 additions and 6 deletions

View File

@@ -130,7 +130,7 @@ HelperWidgets.ScrollView {
} }
textFormat: Text.RichText textFormat: Text.RichText
color: StudioTheme.Values.themeTextColor color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize font.pixelSize: StudioTheme.Values.mediumFontSize
topPadding: 10 topPadding: 10
leftPadding: 10 leftPadding: 10
rightPadding: 10 rightPadding: 10
@@ -140,6 +140,11 @@ HelperWidgets.ScrollView {
width: root.width width: root.width
onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D() onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D()
HoverHandler {
enabled: infoText.hoveredLink
cursorShape: Qt.PointingHandCursor
}
} }
} }
} }

View File

@@ -135,7 +135,7 @@ HelperWidgets.ScrollView {
} }
textFormat: Text.RichText textFormat: Text.RichText
color: StudioTheme.Values.themeTextColor color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize font.pixelSize: StudioTheme.Values.mediumFontSize
topPadding: 10 topPadding: 10
leftPadding: 10 leftPadding: 10
rightPadding: 10 rightPadding: 10
@@ -144,6 +144,11 @@ HelperWidgets.ScrollView {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D() onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D()
HoverHandler {
enabled: infoText.hoveredLink
cursorShape: Qt.PointingHandCursor
}
} }
} }
} }

View File

@@ -232,16 +232,19 @@ Item {
} }
textFormat: Text.RichText textFormat: Text.RichText
color: StudioTheme.Values.themeTextColor color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize font.pixelSize: StudioTheme.Values.mediumFontSize
topPadding: 10 padding: 10
leftPadding: 10
rightPadding: 10
visible: infoText.text !== "" visible: infoText.text !== ""
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: root.width width: root.width
onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D() onLinkActivated: ContentLibraryBackend.rootView.addQtQuick3D()
HoverHandler {
enabled: infoText.hoveredLink
cursorShape: Qt.PointingHandCursor
}
} }
} }
} }

View File

@@ -245,6 +245,8 @@ Item {
mouse.accepted = false mouse.accepted = false
} }
z: 1 z: 1
cursorShape: hint.hoveredLink ? Qt.PointingHandCursor
: Qt.ArrowCursor
} }
MouseArea { MouseArea {