aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2018-11-06 02:50:57 +0000
committerxiphon <xiphon@protonmail.com>2018-11-06 22:18:56 +0300
commit808ecf57ac655152cbd2322c5d3459ab067a1f72 (patch)
treef45c0ed279f9d4ff5e69db4af876586977bbefaa
parent6eb8c8c9d63d35d3a9daa9692301dd104936aefe (diff)
downloadmonzero-gui-808ecf57ac655152cbd2322c5d3459ab067a1f72.tar.gz
monzero-gui-808ecf57ac655152cbd2322c5d3459ab067a1f72.tar.xz
monzero-gui-808ecf57ac655152cbd2322c5d3459ab067a1f72.zip
settings-node: implement correct 'Start/Stop daemon' button logic
-rw-r--r--pages/settings/SettingsNode.qml10
1 files changed, 7 insertions, 3 deletions
diff --git a/pages/settings/SettingsNode.qml b/pages/settings/SettingsNode.qml
index 0e9bccfb..f6ef7e08 100644
--- a/pages/settings/SettingsNode.qml
+++ b/pages/settings/SettingsNode.qml
@@ -383,7 +383,7 @@ Rectangle{
Rectangle {
id: rectStopNode
- color: MoneroComponents.Style.buttonBackgroundColorDisabled
+ color: MoneroComponents.Style.buttonBackgroundColor
width: btnStopNode.width + 40
height: 24
radius: 2
@@ -396,14 +396,18 @@ Rectangle{
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
font.bold: true
- text: qsTr("Stop local node") + translationManager.emptyString
+ text: (appWindow.daemonRunning ? qsTr("Stop local node") : qsTr("Start daemon")) + translationManager.emptyString
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: {
- appWindow.stopDaemon();
+ if (appWindow.daemonRunning) {
+ appWindow.stopDaemon();
+ } else {
+ appWindow.startDaemon(persistentSettings.daemonFlags);
+ }
}
}
}