Turn Marketplace link into an actual link

With consistent styling. The original design didn't have the link underlined but since the rest of the Cura UI has it underlined I let that happen here too.

Contributes to issue CURA-7071.
This commit is contained in:
Ghostkeeper 2020-01-28 14:37:59 +01:00
parent e51a1b18be
commit 38e7a9e4df
No known key found for this signature in database
GPG key ID: 37E2020986774393

View file

@ -31,20 +31,28 @@ Rectangle
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
renderType: Text.NativeRendering renderType: Text.NativeRendering
} }
UM.TooltipArea
{
width: childrenRect.width
height: childrenRect.height
anchors.right: parent.right
text: catalog.i18nc("@info:tooltip", "Go to Web Marketplace")
Label Label
{ {
text: catalog.i18nc("@label", "Search materials") text: "<a href='%2'>".arg(toolbox.getWebMarketplaceUrl("materials")) + catalog.i18nc("@label", "Search materials") + "</a>"
width: parent.width - heading.width width: contentWidth
height: contentHeight height: contentHeight
anchors.right: parent.right
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
elide: Text.ElideLeft
color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering renderType: Text.NativeRendering
linkColor: UM.Theme.getColor("text_link")
onLinkActivated: Qt.openUrlExternally(link)
visible: toolbox.viewCategory === "material" visible: toolbox.viewCategory === "material"
} }
} }
}
Grid Grid
{ {
height: childrenRect.height height: childrenRect.height