mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 23:34:32 +08:00
Add a where to buy link underneath the install button for material
CURA-6148
This commit is contained in:
parent
ad8c269012
commit
df3485aaec
@ -54,7 +54,7 @@ Item
|
|||||||
anchors.top: tile.top
|
anchors.top: tile.top
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
packageData: model
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolboxCompatibilityChart
|
ToolboxCompatibilityChart
|
||||||
|
@ -12,6 +12,7 @@ Column
|
|||||||
property bool installed: toolbox.isInstalled(model.id)
|
property bool installed: toolbox.isInstalled(model.id)
|
||||||
property bool canUpdate: toolbox.canUpdate(model.id)
|
property bool canUpdate: toolbox.canUpdate(model.id)
|
||||||
property bool loginRequired: model.login_required && !Cura.API.account.isLoggedIn
|
property bool loginRequired: model.login_required && !Cura.API.account.isLoggedIn
|
||||||
|
property var packageData
|
||||||
|
|
||||||
width: UM.Theme.getSize("toolbox_action_button").width
|
width: UM.Theme.getSize("toolbox_action_button").width
|
||||||
spacing: UM.Theme.getSize("narrow_margin").height
|
spacing: UM.Theme.getSize("narrow_margin").height
|
||||||
@ -66,6 +67,27 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
property var whereToBuyUrl:
|
||||||
|
{
|
||||||
|
var pg_name = "whereToBuy"
|
||||||
|
return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
text: catalog.i18nc("@label:The string between <a href=> and </a> is the highlighted link", "<a href='%1'>Buy material spools</a>")
|
||||||
|
linkColor: UM.Theme.getColor("text_link")
|
||||||
|
visible: whereToBuyUrl != undefined
|
||||||
|
font: UM.Theme.getFont("default")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: Qt.openUrlExternally(parent.whereToBuyUrl)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ToolboxProgressButton
|
ToolboxProgressButton
|
||||||
{
|
{
|
||||||
id: updateButton
|
id: updateButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user