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