From 9a80065605150316f93a224d4e5db98251ecac7e Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 18 Aug 2020 10:55:07 +0200 Subject: [PATCH] connection toggle tooltip --- src/main/java/com/sparrowwallet/sparrow/AppController.java | 1 + src/main/resources/com/sparrowwallet/sparrow/app.fxml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index 0138e6c7..bb2146f7 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -234,6 +234,7 @@ public class AppController implements Initializable { }); onlineProperty.bindBidirectional(serverToggle.selectedProperty()); + onlineProperty().addListener((observable, oldValue, newValue) -> serverToggle.setTooltip(new Tooltip(newValue ? "Connected to " + Config.get().getElectrumServer() : "Disconnected"))); Config config = Config.get(); connectionService = createConnectionService(); diff --git a/src/main/resources/com/sparrowwallet/sparrow/app.fxml b/src/main/resources/com/sparrowwallet/sparrow/app.fxml index de2902a4..ab80b2b9 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/app.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/app.fxml @@ -76,7 +76,11 @@ - + + + + +