From 7272de90f0ff9d4e9dbe20a2e10e9db2fd93e1b3 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 8 Nov 2021 11:11:15 +0200 Subject: [PATCH] fix mix to wallet display name --- .../sparrowwallet/sparrow/control/WebcamService.java | 2 +- .../sparrowwallet/sparrow/wallet/MixToController.java | 11 +++++++++++ .../com/sparrowwallet/sparrow/wallet/mixto.fxml | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java b/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java index c0a190a5..65c990da 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java @@ -161,7 +161,7 @@ public class WebcamService extends ScheduledService { Graphics2D g2d = (Graphics2D)bufferedImage.getGraphics(); float[] dash1 = {10.0f}; g2d.setColor(Color.BLACK); - g2d.setStroke(new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f)); + g2d.setStroke(new BasicStroke(resolution == WebcamResolution.HD ? 3.0f : 1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f)); g2d.draw(new RoundRectangle2D.Double(x, y, squareSize, squareSize, 10, 10)); g2d.dispose(); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java index ef36207d..99ce9ca7 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java @@ -56,6 +56,17 @@ public class MixToController implements Initializable { allWallets.addAll(destinationWallets); mixToWallets.setItems(FXCollections.observableList(allWallets)); + mixToWallets.setConverter(new StringConverter<>() { + @Override + public String toString(Wallet wallet) { + return wallet == null ? "" : wallet.getFullDisplayName(); + } + + @Override + public Wallet fromString(String string) { + return null; + } + }); String mixToWalletId = null; try { diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/mixto.fxml b/src/main/resources/com/sparrowwallet/sparrow/wallet/mixto.fxml index c42372a0..0a8a3270 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/wallet/mixto.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/mixto.fxml @@ -30,7 +30,7 @@
- + @@ -43,7 +43,7 @@
- +