LabelSubheader: implement tooltip

This commit is contained in:
rating89us 2021-11-19 16:34:34 +01:00
parent ecf5c501d6
commit 9961305867
3 changed files with 7 additions and 17 deletions

View file

@ -34,6 +34,7 @@ import "../components/effects/" as MoneroEffects
Label { Label {
id: item id: item
fontSize: 18 fontSize: 18
tooltipIconVisible: true
Rectangle { Rectangle {
anchors.top: item.bottom anchors.top: item.bottom

View file

@ -95,11 +95,12 @@ Rectangle {
delay: 200 delay: 200
RowLayout { RowLayout {
Layout.maximumWidth: 350 Layout.maximumWidth: 370
Text { Text {
id: tooltip id: tooltip
width: contentWidth width: contentWidth
Layout.maximumWidth: 370
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 12 font.pixelSize: 12

View file

@ -112,11 +112,8 @@ Rectangle {
MoneroComponents.LabelSubheader { MoneroComponents.LabelSubheader {
Layout.fillWidth: true Layout.fillWidth: true
textFormat: Text.RichText textFormat: Text.RichText
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" + text: qsTr("Outputs marked as spent") + translationManager.emptyString
qsTr("Outputs marked as spent") + " <a href='#'>" + qsTr("Help") + "</a>" + translationManager.emptyString tooltip: qsTr(
onLinkActivated: {
sharedRingDBDialog.title = qsTr("Outputs marked as spent") + translationManager.emptyString;
sharedRingDBDialog.text = qsTr(
"In order to obscure which inputs in a Monero transaction are being spent, a third party should not be able " + "In order to obscure which inputs in a Monero transaction are being spent, a third party should not be able " +
"to tell which inputs in a ring are already known to be spent. Being able to do so would weaken the protection " + "to tell which inputs in a ring are already known to be spent. Being able to do so would weaken the protection " +
"afforded by ring signatures. If all but one of the inputs are known to be already spent, then the input being " + "afforded by ring signatures. If all but one of the inputs are known to be already spent, then the input being " +
@ -128,9 +125,6 @@ Rectangle {
"Alternatively, you can scan the blockchain (and the blockchain of key-reusing Monero clones) yourself " + "Alternatively, you can scan the blockchain (and the blockchain of key-reusing Monero clones) yourself " +
"using the monero-blockchain-mark-spent-outputs tool to create a list of known spent outputs.<br>" "using the monero-blockchain-mark-spent-outputs tool to create a list of known spent outputs.<br>"
) + translationManager.emptyString ) + translationManager.emptyString
sharedRingDBDialog.icon = StandardIcon.Information
sharedRingDBDialog.open()
}
} }
MoneroComponents.TextPlain { MoneroComponents.TextPlain {
@ -249,11 +243,8 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 24 Layout.topMargin: 24
textFormat: Text.RichText textFormat: Text.RichText
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" + text: qsTr("Rings") + translationManager.emptyString
qsTr("Rings") + " <a href='#'>" + qsTr("Help") + "</a>" + translationManager.emptyString tooltip: qsTr(
onLinkActivated: {
sharedRingDBDialog.title = qsTr("Rings") + translationManager.emptyString;
sharedRingDBDialog.text = qsTr(
"In order to avoid nullifying the protection afforded by Monero's ring signatures, an output should not " + "In order to avoid nullifying the protection afforded by Monero's ring signatures, an output should not " +
"be spent with different rings on different blockchains. While this is normally not a concern, it can become one " + "be spent with different rings on different blockchains. While this is normally not a concern, it can become one " +
"when a key-reusing Monero clone allows you to spend existing outputs. In this case, you need to ensure this " + "when a key-reusing Monero clone allows you to spend existing outputs. In this case, you need to ensure this " +
@ -266,9 +257,6 @@ Rectangle {
"If you do not use a key-reusing Monero clone without these safety features, then you do not need to do anything " + "If you do not use a key-reusing Monero clone without these safety features, then you do not need to do anything " +
"as it is all automated.<br>" "as it is all automated.<br>"
) + translationManager.emptyString ) + translationManager.emptyString
sharedRingDBDialog.icon = StandardIcon.Information
sharedRingDBDialog.open()
}
} }
MoneroComponents.TextPlain { MoneroComponents.TextPlain {