mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Show cancel button at QR code scan window launch
Fixes https://github.com/bisq-network/bisq/issues/1708
This commit is contained in:
parent
615dd5132e
commit
ba09fbf18c
1 changed files with 8 additions and 2 deletions
|
@ -23,6 +23,8 @@ import bisq.desktop.util.FormBuilder;
|
|||
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import bisq.common.UserThread;
|
||||
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
|
@ -80,8 +82,12 @@ public class WebCamWindow extends Overlay<WebCamWindow> {
|
|||
protected void addCloseButton() {
|
||||
super.addCloseButton();
|
||||
|
||||
closeButton.setVisible(false);
|
||||
listener = (observable, oldValue, newValue) -> closeButton.setVisible(newValue != null);
|
||||
closeButton.setText(Res.get("shared.cancel"));
|
||||
|
||||
listener = (observable, oldValue, newValue) -> {
|
||||
if (newValue != null)
|
||||
UserThread.execute(() -> closeButton.setText(Res.get("shared.close")));
|
||||
};
|
||||
imageView.imageProperty().addListener(listener);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue