Add info tooltip for each option

This commit is contained in:
Angela Mazzurco 2017-07-24 16:25:08 +02:00
parent 89034d2755
commit 731a10a6a5

View File

@ -27,6 +27,8 @@ Item
{
property ApplicationWindow mW
property int infoIconHeight: 20
Column
{
anchors.fill: parent
@ -62,12 +64,30 @@ Item
}
}
}
Row
{
anchors.horizontalCenter: parent.horizontalCenter
spacing: 5
ButtonIcon
{
height: infoIconHeight
anchors.verticalCenter: importButton.verticalCenter
width: height
imgUrl: "/icons/info.svg"
onClicked:
{
tooltipSpace.show(qsTr("Import a friend certificate from your clipboard. <br>"+
"This will add him as trusted node."))
}
}
ButtonText
{
id: importButton
text: qsTr("Import trusted node")
anchors.horizontalCenter: parent.horizontalCenter
// anchors.horizontalCenter: parent.horizontalCenter
iconUrl: "/icons/paste.svg"
fontSize: 14
@ -109,6 +129,7 @@ Item
)
}
}
}
Text
{
@ -139,9 +160,29 @@ Item
}
}
ButtonText
Row
{
anchors.horizontalCenter: parent.horizontalCenter
spacing: 5
ButtonIcon
{
height: infoIconHeight
anchors.verticalCenter: btRsCert.verticalCenter
width: height
imgUrl: "/icons/info.svg"
onClicked:
{
tooltipSpace.show(qsTr("Share your RetroShare link! <br>"+
"Send it to a friend and start talk!"))
}
}
ButtonText
{
id: btRsCert
// anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Export own certificate link")
iconUrl: "/icons/share.svg"
fontSize: 14
@ -167,10 +208,32 @@ Item
})
}
}
}
Row
{
id: plainCertificateRow
anchors.horizontalCenter: parent.horizontalCenter
spacing: 5
visible: false
ButtonIcon
{
height: infoIconHeight
anchors.verticalCenter: btPlainCert.verticalCenter
width: height
imgUrl: "/icons/info.svg"
onClicked:
{
tooltipSpace.show(qsTr("This will copy your RetroShare plain certificate.<br>"+
"Add it manually to your friend client."))
}
}
ButtonText
{
anchors.horizontalCenter: parent.horizontalCenter
id: btPlainCert
text: qsTr("Export own plain certificate")
fontSize: 14
iconUrl: "/icons/share.svg"
@ -187,10 +250,33 @@ Item
linkCopiedPopup.itemName = name
linkCopiedPopup.open()
})
}
}
}
}
Rectangle
{
id: tooltipSpace
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
ToolTip
{
id: infoTooltip
timeout: 5000
Component.onCompleted: show("afafsaf",0)
}
function show (infoText)
{
infoTooltip.text = infoText
infoTooltip.open()
}
}
TimedPopup
{
id: importErrorPop