connection toggle tooltip

This commit is contained in:
Craig Raw 2020-08-18 10:55:07 +02:00
parent ccf4e98968
commit 9a80065605
2 changed files with 6 additions and 1 deletions

View file

@ -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();

View file

@ -76,7 +76,11 @@
<StatusBar fx:id="statusBar" text="" minHeight="36">
<rightItems>
<UnlabeledToggleSwitch fx:id="serverToggle" />
<UnlabeledToggleSwitch fx:id="serverToggle">
<tooltip>
<Tooltip text="Disconnected" />
</tooltip>
</UnlabeledToggleSwitch>
</rightItems>
</StatusBar>
</children>