Merge pull request #3586

614a7a0 RemoteNodeList: display shield icon if trusted daemon (rating89us)
This commit is contained in:
luigi1111 2021-06-24 13:55:08 -05:00
commit b58bff39a0
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 26 additions and 2 deletions

View file

@ -37,6 +37,7 @@ Item {
property alias tooltip: label.tooltip
property alias tooltipIconVisible: label.tooltipIconVisible
property alias color: label.color
property alias labelMouseArea: labelMouseArea
property int textFormat: Text.PlainText
property string tipText: ""
property int fontSize: 16
@ -72,9 +73,13 @@ Item {
onLinkActivated: item.linkActivated()
textFormat: parent.textFormat
MouseArea {
id: labelMouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
cursorShape: parent.hoveredLink || (tooltip && !tooltipIconVisible) ? Qt.PointingHandCursor : Qt.ArrowCursor
onEntered: tooltip && !tooltipIconVisible ? parent.tooltipPopup.open() : undefined
onExited: tooltip && !tooltipIconVisible ? parent.tooltipPopup.close() : undefined
}
}
}

View file

@ -59,7 +59,7 @@ ColumnLayout {
Rectangle {
height: 30
Layout.fillWidth: true
color: itemMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
color: itemMouseArea.containsMouse || trustedDaemonCheckMark.labelMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
Rectangle {
color: MoneroComponents.Style.appWindowBorderColor
@ -80,8 +80,10 @@ ColumnLayout {
anchors.fill: parent
anchors.rightMargin: 80
color: "transparent"
property var trusted: remoteNodesModel.get(index).trusted
MoneroComponents.TextPlain {
id: addressText
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
@ -91,6 +93,22 @@ ColumnLayout {
themeTransition: false
}
MoneroComponents.Label {
id: trustedDaemonCheckMark
anchors.left: addressText.right
anchors.leftMargin: 6
anchors.verticalCenter: parent.verticalCenter
z: itemMouseArea.z + 1
fontSize: 16
fontFamily: FontAwesome.fontFamilySolid
fontColor: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
styleName: "Solid"
visible: trusted
text: FontAwesome.shieldAlt
tooltip: qsTr("Trusted daemon") + translationManager.emptyString
themeTransition: false
}
MouseArea {
id: itemMouseArea
cursorShape: Qt.PointingHandCursor

View file

@ -601,6 +601,7 @@ Object {
property string shekel : "\uf20b"
property string sheqel : "\uf20b"
property string shield : "\uf132"
property string shieldAlt : "\uf3ed"
property string ship : "\uf21a"
property string shirtsinbulk : "\uf214"
property string shoppingBag : "\uf290"