mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-24 23:00:36 -04:00
do not remove background effect if when multiple popups open
This commit is contained in:
parent
665707a6c8
commit
feb97252bb
1 changed files with 6 additions and 3 deletions
|
@ -33,7 +33,6 @@ import haveno.desktop.components.AutoTooltipCheckBox;
|
||||||
import haveno.desktop.components.AutoTooltipLabel;
|
import haveno.desktop.components.AutoTooltipLabel;
|
||||||
import haveno.desktop.components.BusyAnimation;
|
import haveno.desktop.components.BusyAnimation;
|
||||||
import haveno.desktop.main.MainView;
|
import haveno.desktop.main.MainView;
|
||||||
import haveno.desktop.util.CssTheme;
|
|
||||||
import haveno.desktop.util.FormBuilder;
|
import haveno.desktop.util.FormBuilder;
|
||||||
import haveno.desktop.util.GUIUtil;
|
import haveno.desktop.util.GUIUtil;
|
||||||
import haveno.desktop.util.Layout;
|
import haveno.desktop.util.Layout;
|
||||||
|
@ -42,8 +41,6 @@ import javafx.animation.Interpolator;
|
||||||
import javafx.animation.KeyFrame;
|
import javafx.animation.KeyFrame;
|
||||||
import javafx.animation.KeyValue;
|
import javafx.animation.KeyValue;
|
||||||
import javafx.animation.Timeline;
|
import javafx.animation.Timeline;
|
||||||
import javafx.application.Platform;
|
|
||||||
import javafx.beans.binding.Bindings;
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
import javafx.beans.property.BooleanProperty;
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
|
@ -141,6 +138,8 @@ public abstract class Overlay<T extends Overlay<T>> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int numBackgroundEffects = 0;
|
||||||
|
|
||||||
protected final static double DEFAULT_WIDTH = 668;
|
protected final static double DEFAULT_WIDTH = 668;
|
||||||
protected Stage stage;
|
protected Stage stage;
|
||||||
protected GridPane gridPane;
|
protected GridPane gridPane;
|
||||||
|
@ -739,6 +738,8 @@ public abstract class Overlay<T extends Overlay<T>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addEffectToBackground() {
|
protected void addEffectToBackground() {
|
||||||
|
numBackgroundEffects++;
|
||||||
|
if (numBackgroundEffects > 1) return;
|
||||||
if (type.changeBackgroundType == ChangeBackgroundType.BlurUltraLight)
|
if (type.changeBackgroundType == ChangeBackgroundType.BlurUltraLight)
|
||||||
MainView.blurUltraLight();
|
MainView.blurUltraLight();
|
||||||
else if (type.changeBackgroundType == ChangeBackgroundType.BlurLight)
|
else if (type.changeBackgroundType == ChangeBackgroundType.BlurLight)
|
||||||
|
@ -808,6 +809,8 @@ public abstract class Overlay<T extends Overlay<T>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeEffectFromBackground() {
|
protected void removeEffectFromBackground() {
|
||||||
|
numBackgroundEffects--;
|
||||||
|
if (numBackgroundEffects > 0) return;
|
||||||
MainView.removeEffect();
|
MainView.removeEffect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue