fix mix to wallet display name

This commit is contained in:
Craig Raw 2021-11-08 11:11:15 +02:00
parent 98c1f05ed6
commit 7272de90f0
3 changed files with 14 additions and 3 deletions

View file

@ -161,7 +161,7 @@ public class WebcamService extends ScheduledService<Image> {
Graphics2D g2d = (Graphics2D)bufferedImage.getGraphics(); Graphics2D g2d = (Graphics2D)bufferedImage.getGraphics();
float[] dash1 = {10.0f}; float[] dash1 = {10.0f};
g2d.setColor(Color.BLACK); 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.draw(new RoundRectangle2D.Double(x, y, squareSize, squareSize, 10, 10));
g2d.dispose(); g2d.dispose();

View file

@ -56,6 +56,17 @@ public class MixToController implements Initializable {
allWallets.addAll(destinationWallets); allWallets.addAll(destinationWallets);
mixToWallets.setItems(FXCollections.observableList(allWallets)); 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; String mixToWalletId = null;
try { try {

View file

@ -30,7 +30,7 @@
<Form GridPane.columnIndex="0" GridPane.rowIndex="0"> <Form GridPane.columnIndex="0" GridPane.rowIndex="0">
<Fieldset inputGrow="SOMETIMES" text="Mix To Settings"> <Fieldset inputGrow="SOMETIMES" text="Mix To Settings">
<Field text="Mix to wallet:"> <Field text="Mix to wallet:">
<ComboBox fx:id="mixToWallets" prefWidth="140" promptText="None available" /> <ComboBox fx:id="mixToWallets" prefWidth="160" promptText="None available" />
<HelpLabel helpText="Select a single signature wallet that is already open to mix to."/> <HelpLabel helpText="Select a single signature wallet that is already open to mix to."/>
</Field> </Field>
<Field text="Minimum mixes:"> <Field text="Minimum mixes:">
@ -43,7 +43,7 @@
<Form GridPane.columnIndex="0" GridPane.rowIndex="1"> <Form GridPane.columnIndex="0" GridPane.rowIndex="1">
<Fieldset inputGrow="SOMETIMES" text="Postmix Wallet Settings"> <Fieldset inputGrow="SOMETIMES" text="Postmix Wallet Settings">
<Field text="Index range:"> <Field text="Index range:">
<ComboBox fx:id="indexRange" prefWidth="140"> <ComboBox fx:id="indexRange" prefWidth="160">
<items> <items>
<FXCollections fx:factory="observableArrayList"> <FXCollections fx:factory="observableArrayList">
<IndexRange fx:constant="FULL" /> <IndexRange fx:constant="FULL" />