RemoteNodeList: display shield icon if trusted daemon

This commit is contained in:
rating89us
2021-06-23 02:28:48 +02:00
committed by rating89us
parent 453388f744
commit 614a7a086a
3 changed files with 26 additions and 2 deletions

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