mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-24 23:46:00 -04:00
Add missing support to deactivate animations
This commit is contained in:
parent
415530c8ef
commit
4fc3b00fa4
3 changed files with 12 additions and 7 deletions
|
@ -740,11 +740,8 @@ public abstract class Overlay<T extends Overlay> {
|
|||
truncatedMessage = message;
|
||||
}
|
||||
|
||||
private int getDuration(int duration) {
|
||||
if (preferences != null)
|
||||
return preferences.getUseAnimations() ? duration : 1;
|
||||
else
|
||||
return duration;
|
||||
protected int getDuration(int duration) {
|
||||
return Preferences.useAnimations() ? duration : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -94,7 +94,7 @@ public class Notification extends Overlay<Notification> {
|
|||
}
|
||||
|
||||
if (NotificationCenter.useAnimations) {
|
||||
double duration = 400;
|
||||
double duration = getDuration(400);
|
||||
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
||||
|
||||
gridPane.setRotationAxis(Rotate.X_AXIS);
|
||||
|
@ -127,7 +127,7 @@ public class Notification extends Overlay<Notification> {
|
|||
protected void animateDisplay() {
|
||||
if (NotificationCenter.useAnimations) {
|
||||
double startX = 320;
|
||||
double duration = 600;
|
||||
double duration = getDuration(600);
|
||||
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
||||
|
||||
Timeline timeline = new Timeline();
|
||||
|
@ -154,6 +154,7 @@ public class Notification extends Overlay<Notification> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createGridPane() {
|
||||
super.createGridPane();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue