mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-27 04:55:54 +00:00
settings-node: use StandardButton instead of custom buttons
This commit is contained in:
parent
59fc48bd8b
commit
d70f714f35
1 changed files with 20 additions and 70 deletions
|
@ -300,9 +300,6 @@ Rectangle{
|
||||||
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
||||||
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
|
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
|
||||||
}
|
}
|
||||||
onTextChanged: {
|
|
||||||
rectConnectRemote.enabled = remoteNodeEdit.isValid();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
|
@ -333,30 +330,11 @@ Rectangle{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.StandardButton {
|
||||||
id: rectConnectRemote
|
|
||||||
Layout.topMargin: 12 * scaleRatio
|
|
||||||
enabled: remoteNodeEdit.isValid()
|
|
||||||
color: enabled ? MoneroComponents.Style.buttonBackgroundColor : MoneroComponents.Style.buttonBackgroundColorDisabled
|
|
||||||
width: btnConnectRemote.width + 40
|
|
||||||
height: 26
|
|
||||||
radius: 2
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: btnConnectRemote
|
id: btnConnectRemote
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
enabled: remoteNodeEdit.isValid()
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
small: true
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
|
||||||
font.pixelSize: 14 * scaleRatio
|
|
||||||
font.bold: true
|
|
||||||
text: qsTr("Connect") + translationManager.emptyString
|
text: qsTr("Connect") + translationManager.emptyString
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
visible: rectConnectRemote.enabled
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// Update daemon login
|
// Update daemon login
|
||||||
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
||||||
|
@ -370,7 +348,6 @@ Rectangle{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: localNodeLayout
|
id: localNodeLayout
|
||||||
|
@ -381,34 +358,9 @@ Rectangle{
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
visible: !isMobile && !persistentSettings.useRemoteNode
|
visible: !isMobile && !persistentSettings.useRemoteNode
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.StandardButton {
|
||||||
color: "transparent"
|
small: true
|
||||||
Layout.topMargin: 0 * scaleRatio
|
|
||||||
Layout.bottomMargin: 8 * scaleRatio
|
|
||||||
Layout.preferredHeight: 24 * scaleRatio
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: rectStartStopNode
|
|
||||||
color: MoneroComponents.Style.buttonBackgroundColor
|
|
||||||
width: btnStartStopNode.width + 40
|
|
||||||
height: 24
|
|
||||||
radius: 2
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: btnStartStopNode
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
|
||||||
font.pixelSize: 14 * scaleRatio
|
|
||||||
font.bold: true
|
|
||||||
text: (appWindow.daemonRunning ? qsTr("Stop local node") : qsTr("Start daemon")) + translationManager.emptyString
|
text: (appWindow.daemonRunning ? qsTr("Stop local node") : qsTr("Start daemon")) + translationManager.emptyString
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (appWindow.daemonRunning) {
|
if (appWindow.daemonRunning) {
|
||||||
appWindow.stopDaemon();
|
appWindow.stopDaemon();
|
||||||
|
@ -417,8 +369,6 @@ Rectangle{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
MoneroComponents.LineEditMulti {
|
MoneroComponents.LineEditMulti {
|
||||||
|
|
Loading…
Reference in a new issue