Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements/fixes #1728

Merged
merged 13 commits into from Sep 27, 2018
26 changes: 15 additions & 11 deletions desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java
Expand Up @@ -193,21 +193,25 @@ protected void onShow() {

public void hide() {
if (gridPane != null) {
animateHide(() -> {
removeEffectFromBackground();

if (stage != null)
stage.hide();
else
log.warn("Stage is null");

cleanup();
onHidden();
});
animateHide();
}
isDisplayed = false;
}

protected void animateHide() {
animateHide(() -> {
removeEffectFromBackground();

if (stage != null)
stage.hide();
else
log.warn("Stage is null");

cleanup();
onHidden();
});
}

protected void onHidden() {
}

Expand Down
Expand Up @@ -154,17 +154,7 @@ protected void onShow() {

@Override
public void hide() {
animateHide(() -> {
removeEffectFromBackground();

if (stage != null)
stage.hide();
else
log.warn("Stage is null");

cleanup();
onHidden();
});
animateHide();
}

@Override
Expand Down
Expand Up @@ -34,6 +34,7 @@

import javafx.scene.Camera;
import javafx.scene.PerspectiveCamera;
import javafx.scene.input.MouseEvent;
import javafx.scene.transform.Rotate;

import javafx.geometry.Insets;
Expand All @@ -59,23 +60,18 @@ public Notification() {

public void onReadyForDisplay() {
super.display();

if (autoClose && autoCloseTimer == null)
autoCloseTimer = UserThread.runAfter(this::doClose, 6);

stage.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> {
doClose();
});
}

@Override
public void hide() {
animateHide(() -> {
removeEffectFromBackground();

if (stage != null)
stage.hide();
else
log.warn("Stage is null");

cleanup();
onHidden();
});
animateHide();
}

@Override
Expand Down