Merge pull request #6311 from jmacxx/fix_qrcode_copypaste

Fix ability to copypaste QR code URL
This commit is contained in:
Christoph Atteneder 2022-08-07 21:35:38 +02:00 committed by GitHub
commit 07168a3fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,26 +65,16 @@ public class QRCodeWindow extends Overlay<QRCodeWindow> {
public void show() {
createGridPane();
addHeadLine();
addMessage();
GridPane.setRowIndex(qrCodeImageView, ++rowIndex);
GridPane.setColumnSpan(qrCodeImageView, 2);
GridPane.setHalignment(qrCodeImageView, HPos.CENTER);
gridPane.getChildren().add(qrCodeImageView);
String request = bitcoinURI.replace("%20", " ").replace("?", "\n?").replace("&", "\n&");
Label infoLabel = new AutoTooltipLabel(Res.get("qRCodeWindow.request", request));
infoLabel.setMouseTransparent(true);
infoLabel.setWrapText(true);
infoLabel.setId("popup-qr-code-info");
GridPane.setHalignment(infoLabel, HPos.CENTER);
GridPane.setHgrow(infoLabel, Priority.ALWAYS);
GridPane.setMargin(infoLabel, new Insets(3, 0, 0, 0));
GridPane.setRowIndex(infoLabel, ++rowIndex);
GridPane.setColumnIndex(infoLabel, 0);
GridPane.setColumnSpan(infoLabel, 2);
gridPane.getChildren().add(infoLabel);
message = bitcoinURI.replace("%20", " ").replace("?", "\n?").replace("&", "\n&");
setTruncatedMessage();
addMessage();
addButtons();
applyStyles();
display();