* hide webview while it's loading
This commit is contained in:
parent
aa26342eb8
commit
b3e5071a64
|
@ -63,7 +63,10 @@ public class GettingStartedStage {
|
||||||
|
|
||||||
webview.getEngine().getLoadWorker().stateProperty().addListener((v, o, n) -> {
|
webview.getEngine().getLoadWorker().stateProperty().addListener((v, o, n) -> {
|
||||||
if (n == Worker.State.SUCCEEDED) {
|
if (n == Worker.State.SUCCEEDED) {
|
||||||
|
stage.setOpacity(1.0);
|
||||||
webview.requestFocus();
|
webview.requestFocus();
|
||||||
|
} else if (n == Worker.State.FAILED) {
|
||||||
|
stage.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -75,6 +78,7 @@ public class GettingStartedStage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show() {
|
public void show() {
|
||||||
|
stage.setOpacity(0.0);
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue