mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
disable clear button when no utxos are selected
This commit is contained in:
parent
516ee26ba0
commit
6aa3bb2ff3
2 changed files with 6 additions and 1 deletions
|
@ -83,6 +83,9 @@ public class UtxosController extends WalletFormController implements Initializab
|
|||
@FXML
|
||||
private Button mixTo;
|
||||
|
||||
@FXML
|
||||
private Button clear;
|
||||
|
||||
@FXML
|
||||
private Button sendSelected;
|
||||
|
||||
|
@ -172,6 +175,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
|||
}
|
||||
}
|
||||
|
||||
clear.setDisable(true);
|
||||
sendSelected.setDisable(true);
|
||||
sendSelected.setTooltip(new Tooltip("Send selected UTXOs. Use " + (org.controlsfx.tools.Platform.getCurrent() == org.controlsfx.tools.Platform.OSX ? "Cmd" : "Ctrl") + "+click to select multiple." ));
|
||||
mixSelected.managedProperty().bind(mixSelected.visibleProperty());
|
||||
|
@ -199,6 +203,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
|||
private void updateButtons(BitcoinUnit unit) {
|
||||
List<Entry> selectedEntries = getSelectedEntries();
|
||||
|
||||
clear.setDisable(selectedEntries.isEmpty());
|
||||
sendSelected.setDisable(selectedEntries.isEmpty());
|
||||
mixSelected.setDisable(selectedEntries.isEmpty() || !AppServices.isConnected());
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</HBox>
|
||||
<Region HBox.hgrow="ALWAYS" />
|
||||
<HBox styleClass="utxos-buttons-box" spacing="20" alignment="BOTTOM_RIGHT">
|
||||
<Button text="Clear" onAction="#clear"/>
|
||||
<Button fx:id="clear" text="Clear" onAction="#clear"/>
|
||||
<Button fx:id="mixSelected" text="Mix Selected" graphicTextGap="5" onAction="#mixSelected">
|
||||
<graphic>
|
||||
<Glyph fontFamily="Font Awesome 5 Free Solid" icon="RANDOM" fontSize="12" />
|
||||
|
|
Loading…
Reference in a new issue