mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
Add missing support to deactivate animations
This commit is contained in:
parent
d24f0bf270
commit
415530c8ef
@ -91,7 +91,6 @@ public final class Preferences implements Persistable {
|
||||
// Persisted fields
|
||||
private String btcDenomination = MonetaryFormat.CODE_BTC;
|
||||
private boolean useAnimations = true;
|
||||
private boolean useEffects = true;
|
||||
private final ArrayList<FiatCurrency> fiatCurrencies;
|
||||
private final ArrayList<CryptoCurrency> cryptoCurrencies;
|
||||
private BlockChainExplorer blockChainExplorerMainNet;
|
||||
|
@ -31,7 +31,7 @@
|
||||
<columns>
|
||||
<TableColumn text="Date/Time" fx:id="dateColumn" minWidth="180" maxWidth="180"/>
|
||||
<TableColumn text="Details" fx:id="detailsColumn" minWidth="260"/>
|
||||
<TableColumn text="Address" fx:id="addressColumn" minWidth="320" maxWidth="320">
|
||||
<TableColumn text="Address" fx:id="addressColumn" minWidth="320">
|
||||
<cellValueFactory>
|
||||
<PropertyValueFactory property="addressString"/>
|
||||
</cellValueFactory>
|
||||
|
@ -32,7 +32,7 @@
|
||||
<TableColumn text="Select" fx:id="selectColumn" minWidth="60" maxWidth="60" sortable="false"/>
|
||||
<TableColumn text="Date/Time" fx:id="dateColumn" minWidth="180" maxWidth="180"/>
|
||||
<TableColumn text="Details" fx:id="detailsColumn" minWidth="160"/>
|
||||
<TableColumn text="Address" fx:id="addressColumn" minWidth="320" maxWidth="320">
|
||||
<TableColumn text="Address" fx:id="addressColumn" minWidth="320">
|
||||
<cellValueFactory>
|
||||
<PropertyValueFactory property="addressString"/>
|
||||
</cellValueFactory>
|
||||
|
@ -409,7 +409,7 @@ public abstract class Overlay<T extends Overlay> {
|
||||
protected void animateDisplay() {
|
||||
gridPane.setOpacity(0);
|
||||
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
||||
double duration = 400;
|
||||
double duration = getDuration(400);
|
||||
Timeline timeline = new Timeline();
|
||||
ObservableList<KeyFrame> keyFrames = timeline.getKeyFrames();
|
||||
|
||||
@ -475,7 +475,7 @@ public abstract class Overlay<T extends Overlay> {
|
||||
|
||||
protected void animateHide(Runnable onFinishedHandler) {
|
||||
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
||||
double duration = 200;
|
||||
double duration = getDuration(200);
|
||||
Timeline timeline = new Timeline();
|
||||
ObservableList<KeyFrame> keyFrames = timeline.getKeyFrames();
|
||||
|
||||
@ -740,6 +740,13 @@ 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Popup{" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user