mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 03:42:05 +02:00
Merge pull request #1728
808ecf5
settings-node: implement correct 'Start/Stop daemon' button logic (xiphon)42a9e2f
settings-node: change element id 'btnStopNode' to 'btnStartStopNode' (xiphon)
This commit is contained in:
commit
270a637924
@ -382,28 +382,32 @@ Rectangle{
|
|||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectStopNode
|
id: rectStartStopNode
|
||||||
color: MoneroComponents.Style.buttonBackgroundColorDisabled
|
color: MoneroComponents.Style.buttonBackgroundColor
|
||||||
width: btnStopNode.width + 40
|
width: btnStartStopNode.width + 40
|
||||||
height: 24
|
height: 24
|
||||||
radius: 2
|
radius: 2
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: btnStopNode
|
id: btnStartStopNode
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 14 * scaleRatio
|
font.pixelSize: 14 * scaleRatio
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: qsTr("Stop local node") + translationManager.emptyString
|
text: (appWindow.daemonRunning ? qsTr("Stop local node") : qsTr("Start daemon")) + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
appWindow.stopDaemon();
|
if (appWindow.daemonRunning) {
|
||||||
|
appWindow.stopDaemon();
|
||||||
|
} else {
|
||||||
|
appWindow.startDaemon(persistentSettings.daemonFlags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user