mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-24 02:30:33 +02:00
settings-node: implement correct 'Start/Stop daemon' button logic
This commit is contained in:
parent
6eb8c8c9d6
commit
808ecf57ac
@ -383,7 +383,7 @@ Rectangle{
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectStopNode
|
id: rectStopNode
|
||||||
color: MoneroComponents.Style.buttonBackgroundColorDisabled
|
color: MoneroComponents.Style.buttonBackgroundColor
|
||||||
width: btnStopNode.width + 40
|
width: btnStopNode.width + 40
|
||||||
height: 24
|
height: 24
|
||||||
radius: 2
|
radius: 2
|
||||||
@ -396,14 +396,18 @@ Rectangle{
|
|||||||
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: {
|
||||||
|
if (appWindow.daemonRunning) {
|
||||||
appWindow.stopDaemon();
|
appWindow.stopDaemon();
|
||||||
|
} else {
|
||||||
|
appWindow.startDaemon(persistentSettings.daemonFlags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user