mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-28 17:34:11 -04:00
Add missing support to deactivate animations
This commit is contained in:
parent
d24f0bf270
commit
415530c8ef
4 changed files with 11 additions and 5 deletions
|
@ -91,7 +91,6 @@ public final class Preferences implements Persistable {
|
||||||
// Persisted fields
|
// Persisted fields
|
||||||
private String btcDenomination = MonetaryFormat.CODE_BTC;
|
private String btcDenomination = MonetaryFormat.CODE_BTC;
|
||||||
private boolean useAnimations = true;
|
private boolean useAnimations = true;
|
||||||
private boolean useEffects = true;
|
|
||||||
private final ArrayList<FiatCurrency> fiatCurrencies;
|
private final ArrayList<FiatCurrency> fiatCurrencies;
|
||||||
private final ArrayList<CryptoCurrency> cryptoCurrencies;
|
private final ArrayList<CryptoCurrency> cryptoCurrencies;
|
||||||
private BlockChainExplorer blockChainExplorerMainNet;
|
private BlockChainExplorer blockChainExplorerMainNet;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn text="Date/Time" fx:id="dateColumn" minWidth="180" maxWidth="180"/>
|
<TableColumn text="Date/Time" fx:id="dateColumn" minWidth="180" maxWidth="180"/>
|
||||||
<TableColumn text="Details" fx:id="detailsColumn" minWidth="260"/>
|
<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>
|
<cellValueFactory>
|
||||||
<PropertyValueFactory property="addressString"/>
|
<PropertyValueFactory property="addressString"/>
|
||||||
</cellValueFactory>
|
</cellValueFactory>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<TableColumn text="Select" fx:id="selectColumn" minWidth="60" maxWidth="60" sortable="false"/>
|
<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="Date/Time" fx:id="dateColumn" minWidth="180" maxWidth="180"/>
|
||||||
<TableColumn text="Details" fx:id="detailsColumn" minWidth="160"/>
|
<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>
|
<cellValueFactory>
|
||||||
<PropertyValueFactory property="addressString"/>
|
<PropertyValueFactory property="addressString"/>
|
||||||
</cellValueFactory>
|
</cellValueFactory>
|
||||||
|
|
|
@ -409,7 +409,7 @@ public abstract class Overlay<T extends Overlay> {
|
||||||
protected void animateDisplay() {
|
protected void animateDisplay() {
|
||||||
gridPane.setOpacity(0);
|
gridPane.setOpacity(0);
|
||||||
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
||||||
double duration = 400;
|
double duration = getDuration(400);
|
||||||
Timeline timeline = new Timeline();
|
Timeline timeline = new Timeline();
|
||||||
ObservableList<KeyFrame> keyFrames = timeline.getKeyFrames();
|
ObservableList<KeyFrame> keyFrames = timeline.getKeyFrames();
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ public abstract class Overlay<T extends Overlay> {
|
||||||
|
|
||||||
protected void animateHide(Runnable onFinishedHandler) {
|
protected void animateHide(Runnable onFinishedHandler) {
|
||||||
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
|
||||||
double duration = 200;
|
double duration = getDuration(200);
|
||||||
Timeline timeline = new Timeline();
|
Timeline timeline = new Timeline();
|
||||||
ObservableList<KeyFrame> keyFrames = timeline.getKeyFrames();
|
ObservableList<KeyFrame> keyFrames = timeline.getKeyFrames();
|
||||||
|
|
||||||
|
@ -740,6 +740,13 @@ public abstract class Overlay<T extends Overlay> {
|
||||||
truncatedMessage = message;
|
truncatedMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getDuration(int duration) {
|
||||||
|
if (preferences != null)
|
||||||
|
return preferences.getUseAnimations() ? duration : 1;
|
||||||
|
else
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Popup{" +
|
return "Popup{" +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue