Implement More-info button on Data Collection page

This commit is contained in:
Lipu Fei 2019-03-26 15:18:54 +01:00
parent e564687722
commit 98b7df790d

View file

@ -36,11 +36,12 @@ Item
anchors.bottom: getStartedButton.top anchors.bottom: getStartedButton.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.margins: UM.Theme.getSize("default_margin").width anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
Column Column
{ {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width
spacing: UM.Theme.getSize("welcome_pages_default_margin").height spacing: UM.Theme.getSize("welcome_pages_default_margin").height
@ -54,12 +55,29 @@ Item
Label Label
{ {
id: textLabel id: textLabel
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality<br/>and user experience. <a href=\"TODO\">More information</a>") text:
{
var t = catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality and user experience.")
var t2 = catalog.i18nc("@text", "More information")
t += " <span style=\"color: rgb(0,0,255)\">" + t2 + "</span>"
return t
}
textFormat: Text.RichText textFormat: Text.RichText
wrapMode: Text.WordWrap
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering renderType: Text.NativeRendering
MouseArea
{
anchors.fill: parent
onClicked:
{
CuraApplication.showMoreInformationDialogForAnonymousDataCollection()
}
}
} }
} }
} }