mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
Merge pull request #3586
614a7a0
RemoteNodeList: display shield icon if trusted daemon (rating89us)
This commit is contained in:
commit
b58bff39a0
3 changed files with 26 additions and 2 deletions
|
@ -37,6 +37,7 @@ Item {
|
||||||
property alias tooltip: label.tooltip
|
property alias tooltip: label.tooltip
|
||||||
property alias tooltipIconVisible: label.tooltipIconVisible
|
property alias tooltipIconVisible: label.tooltipIconVisible
|
||||||
property alias color: label.color
|
property alias color: label.color
|
||||||
|
property alias labelMouseArea: labelMouseArea
|
||||||
property int textFormat: Text.PlainText
|
property int textFormat: Text.PlainText
|
||||||
property string tipText: ""
|
property string tipText: ""
|
||||||
property int fontSize: 16
|
property int fontSize: 16
|
||||||
|
@ -72,9 +73,13 @@ Item {
|
||||||
onLinkActivated: item.linkActivated()
|
onLinkActivated: item.linkActivated()
|
||||||
textFormat: parent.textFormat
|
textFormat: parent.textFormat
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: labelMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.NoButton
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ ColumnLayout {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: 30
|
height: 30
|
||||||
Layout.fillWidth: true
|
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 {
|
Rectangle {
|
||||||
color: MoneroComponents.Style.appWindowBorderColor
|
color: MoneroComponents.Style.appWindowBorderColor
|
||||||
|
@ -80,8 +80,10 @@ ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: 80
|
anchors.rightMargin: 80
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
property var trusted: remoteNodesModel.get(index).trusted
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
|
id: addressText
|
||||||
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -91,6 +93,22 @@ ColumnLayout {
|
||||||
themeTransition: false
|
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 {
|
MouseArea {
|
||||||
id: itemMouseArea
|
id: itemMouseArea
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
|
@ -601,6 +601,7 @@ Object {
|
||||||
property string shekel : "\uf20b"
|
property string shekel : "\uf20b"
|
||||||
property string sheqel : "\uf20b"
|
property string sheqel : "\uf20b"
|
||||||
property string shield : "\uf132"
|
property string shield : "\uf132"
|
||||||
|
property string shieldAlt : "\uf3ed"
|
||||||
property string ship : "\uf21a"
|
property string ship : "\uf21a"
|
||||||
property string shirtsinbulk : "\uf214"
|
property string shirtsinbulk : "\uf214"
|
||||||
property string shoppingBag : "\uf290"
|
property string shoppingBag : "\uf290"
|
||||||
|
|
Loading…
Reference in a new issue