mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
make transaction diagram tooltips show indefinitely
This commit is contained in:
parent
d7ff73243c
commit
13a3ce23e7
1 changed files with 5 additions and 0 deletions
|
@ -256,6 +256,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
tooltip.getStyleClass().add("input-label");
|
tooltip.getStyleClass().add("input-label");
|
||||||
}
|
}
|
||||||
tooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
tooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
||||||
|
tooltip.setShowDuration(Duration.INDEFINITE);
|
||||||
label.setTooltip(tooltip);
|
label.setTooltip(tooltip);
|
||||||
|
|
||||||
inputsBox.getChildren().add(label);
|
inputsBox.getChildren().add(label);
|
||||||
|
@ -403,6 +404,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
+ (payment instanceof AdditionalPayment ? "\n" + payment : (toWallet == null ? (payment.getLabel() == null ? (toNode != null ? toNode : "external address") : payment.getLabel()) : toWallet.getFullDisplayName()) + "\n" + payment.getAddress().toString()));
|
+ (payment instanceof AdditionalPayment ? "\n" + payment : (toWallet == null ? (payment.getLabel() == null ? (toNode != null ? toNode : "external address") : payment.getLabel()) : toWallet.getFullDisplayName()) + "\n" + payment.getAddress().toString()));
|
||||||
recipientTooltip.getStyleClass().add("recipient-label");
|
recipientTooltip.getStyleClass().add("recipient-label");
|
||||||
recipientTooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
recipientTooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
||||||
|
recipientTooltip.setShowDuration(Duration.INDEFINITE);
|
||||||
recipientLabel.setTooltip(recipientTooltip);
|
recipientLabel.setTooltip(recipientTooltip);
|
||||||
outputNodes.add(new OutputNode(recipientLabel, payment.getAddress()));
|
outputNodes.add(new OutputNode(recipientLabel, payment.getAddress()));
|
||||||
}
|
}
|
||||||
|
@ -420,6 +422,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
Tooltip changeTooltip = new Tooltip("Change of " + getSatsValue(changeEntry.getValue()) + " sats to " + changeNode + "\n" + walletTx.getChangeAddress(changeNode).toString() + (overGapLimit ? "\nAddress is beyond the gap limit!" : ""));
|
Tooltip changeTooltip = new Tooltip("Change of " + getSatsValue(changeEntry.getValue()) + " sats to " + changeNode + "\n" + walletTx.getChangeAddress(changeNode).toString() + (overGapLimit ? "\nAddress is beyond the gap limit!" : ""));
|
||||||
changeTooltip.getStyleClass().add("change-label");
|
changeTooltip.getStyleClass().add("change-label");
|
||||||
changeTooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
changeTooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
||||||
|
changeTooltip.setShowDuration(Duration.INDEFINITE);
|
||||||
changeLabel.setTooltip(changeTooltip);
|
changeLabel.setTooltip(changeTooltip);
|
||||||
actionBox.getChildren().add(changeLabel);
|
actionBox.getChildren().add(changeLabel);
|
||||||
|
|
||||||
|
@ -458,6 +461,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
Tooltip feeTooltip = new Tooltip(walletTx.getFee() < 0 ? "Unknown fee" : "Fee of " + getSatsValue(walletTx.getFee()) + " sats (" + percentage + "%)");
|
Tooltip feeTooltip = new Tooltip(walletTx.getFee() < 0 ? "Unknown fee" : "Fee of " + getSatsValue(walletTx.getFee()) + " sats (" + percentage + "%)");
|
||||||
feeTooltip.getStyleClass().add("fee-tooltip");
|
feeTooltip.getStyleClass().add("fee-tooltip");
|
||||||
feeTooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
feeTooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
||||||
|
feeTooltip.setShowDuration(Duration.INDEFINITE);
|
||||||
feeLabel.setTooltip(feeTooltip);
|
feeLabel.setTooltip(feeTooltip);
|
||||||
outputsBox.getChildren().add(feeLabel);
|
outputsBox.getChildren().add(feeLabel);
|
||||||
outputsBox.getChildren().add(createSpacer());
|
outputsBox.getChildren().add(createSpacer());
|
||||||
|
@ -478,6 +482,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
+ String.format("%.2f", walletTx.getTransaction().getVirtualSize()) + " vBytes"
|
+ String.format("%.2f", walletTx.getTransaction().getVirtualSize()) + " vBytes"
|
||||||
+ (walletTx.getFee() < 0 ? "" : "\n" + String.format("%.2f", walletTx.getFee() / walletTx.getTransaction().getVirtualSize()) + " sats/vB" + (isFinalized ? "" : " (non-final)")));
|
+ (walletTx.getFee() < 0 ? "" : "\n" + String.format("%.2f", walletTx.getFee() / walletTx.getTransaction().getVirtualSize()) + " sats/vB" + (isFinalized ? "" : " (non-final)")));
|
||||||
tooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
tooltip.setShowDelay(new Duration(TOOLTIP_SHOW_DELAY));
|
||||||
|
tooltip.setShowDuration(Duration.INDEFINITE);
|
||||||
tooltip.getStyleClass().add("transaction-tooltip");
|
tooltip.getStyleClass().add("transaction-tooltip");
|
||||||
txLabel.setTooltip(tooltip);
|
txLabel.setTooltip(tooltip);
|
||||||
txPane.getChildren().add(txLabel);
|
txPane.getChildren().add(txLabel);
|
||||||
|
|
Loading…
Reference in a new issue