Skip to content

Commit

Permalink
slow down qr animation
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Nov 12, 2020
1 parent c860063 commit 90ac786
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class QRDisplayDialog extends Dialog<UR> {
private static final int MIN_FRAGMENT_LENGTH = 10;
private static final int MAX_FRAGMENT_LENGTH = 100;

private static final int ANIMATION_PERIOD_MILLIS = 200;

private final UR ur;
private final UREncoder encoder;

Expand Down Expand Up @@ -61,7 +63,7 @@ public QRDisplayDialog(UR ur) {
qrImageView.setImage(getQrCode(currentPart));
} else {
AnimateQRService animateQRService = new AnimateQRService();
animateQRService.setPeriod(Duration.millis(100));
animateQRService.setPeriod(Duration.millis(ANIMATION_PERIOD_MILLIS));
animateQRService.start();
setOnCloseRequest(event -> {
animateQRService.cancel();
Expand Down

0 comments on commit 90ac786

Please sign in to comment.