From ab46c8d4573ce2a05298a22bfffbc6ee0a97fdeb Mon Sep 17 00:00:00 2001 From: Angela Mazzurco Date: Sat, 22 Jul 2017 19:51:32 +0200 Subject: [PATCH] Refactor to use custom buttons --- retroshare-qml-app/src/TrustedNodesView.qml | 38 ++++++++------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/retroshare-qml-app/src/TrustedNodesView.qml b/retroshare-qml-app/src/TrustedNodesView.qml index 2eb9cc2ef..c53cb3bed 100644 --- a/retroshare-qml-app/src/TrustedNodesView.qml +++ b/retroshare-qml-app/src/TrustedNodesView.qml @@ -66,37 +66,29 @@ Item anchors.top: parent.top anchors.bottom: bottomButton.top model: jsonModel.model + anchors.horizontalCenter: parent.horizontalCenter + spacing: 3 delegate: Item { property bool isOnline: jsonModel.isOnline(model.pgp_id) height: 54 width: parent.width + anchors.horizontalCenter: parent.horizontalCenter - Image - { - id: statusImage - source: isOnline? - "icons/state-ok.svg" : - "icons/state-offline.svg" - - height: parent.height - 4 - sourceSize.height: height - fillMode: Image.PreserveAspectFit - anchors.left: parent.left - anchors.leftMargin: 3 - anchors.verticalCenter: parent.verticalCenter - } - Text + ButtonText { + id: locationButton +// anchors.horizontalCenter: parent.horizontalCenter text: model.name - anchors.verticalCenter: parent.verticalCenter - anchors.left: statusImage.right - anchors.leftMargin: 10 - font.pixelSize: 15 - } - MouseArea - { - anchors.fill: parent + borderRadius:0 + iconUrl: isOnline? + "/icons/state-ok.svg" : + "/icons/state-offline.svg" + color: "white" + pressColor: "lightsteelblue" + buttonTextPixelSize: 18 + iconHeight:parent.height - 4 + onClicked: { stackView.push(