mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 16:45:49 -04:00
Add info tooltip for each option
This commit is contained in:
parent
89034d2755
commit
731a10a6a5
1 changed files with 163 additions and 77 deletions
|
@ -27,6 +27,8 @@ Item
|
||||||
{
|
{
|
||||||
property ApplicationWindow mW
|
property ApplicationWindow mW
|
||||||
|
|
||||||
|
property int infoIconHeight: 20
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
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
|
ButtonText
|
||||||
{
|
{
|
||||||
id: importButton
|
id: importButton
|
||||||
text: qsTr("Import trusted node")
|
text: qsTr("Import trusted node")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
// anchors.horizontalCenter: parent.horizontalCenter
|
||||||
iconUrl: "/icons/paste.svg"
|
iconUrl: "/icons/paste.svg"
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
|
|
||||||
|
@ -109,6 +129,7 @@ Item
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
|
@ -139,9 +160,29 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonText
|
Row
|
||||||
{
|
{
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
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")
|
text: qsTr("Export own certificate link")
|
||||||
iconUrl: "/icons/share.svg"
|
iconUrl: "/icons/share.svg"
|
||||||
fontSize: 14
|
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
|
ButtonText
|
||||||
{
|
{
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
id: btPlainCert
|
||||||
text: qsTr("Export own plain certificate")
|
text: qsTr("Export own plain certificate")
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
iconUrl: "/icons/share.svg"
|
iconUrl: "/icons/share.svg"
|
||||||
|
@ -187,10 +250,33 @@ Item
|
||||||
linkCopiedPopup.itemName = name
|
linkCopiedPopup.itemName = name
|
||||||
linkCopiedPopup.open()
|
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
|
TimedPopup
|
||||||
{
|
{
|
||||||
id: importErrorPop
|
id: importErrorPop
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue