mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Merge pull request #5090 from jmacxx/disable_cpu_intensive_animations
Disable CPU-intensive animations
This commit is contained in:
commit
071e1e5a57
4 changed files with 37 additions and 26 deletions
|
@ -688,10 +688,11 @@ public class MainView extends InitializableView<StackPane, MainViewModel>
|
|||
setLeftAnchor(btcInfoLabel, 10d);
|
||||
setBottomAnchor(btcInfoLabel, 7d);
|
||||
|
||||
ProgressBar blockchainSyncIndicator = new JFXProgressBar(-1);
|
||||
blockchainSyncIndicator.setPrefWidth(80);
|
||||
blockchainSyncIndicator.setMaxHeight(10);
|
||||
blockchainSyncIndicator.progressProperty().bind(model.getCombinedSyncProgress());
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
//ProgressBar blockchainSyncIndicator = new JFXProgressBar(-1);
|
||||
//blockchainSyncIndicator.setPrefWidth(80);
|
||||
//blockchainSyncIndicator.setMaxHeight(10);
|
||||
//blockchainSyncIndicator.progressProperty().bind(model.getCombinedSyncProgress());
|
||||
|
||||
model.getWalletServiceErrorMsg().addListener((ov, oldValue, newValue) -> {
|
||||
if (newValue != null) {
|
||||
|
@ -708,12 +709,13 @@ public class MainView extends InitializableView<StackPane, MainViewModel>
|
|||
}
|
||||
});
|
||||
|
||||
model.getCombinedSyncProgress().addListener((ov, oldValue, newValue) -> {
|
||||
if ((double) newValue >= 1) {
|
||||
blockchainSyncIndicator.setVisible(false);
|
||||
blockchainSyncIndicator.setManaged(false);
|
||||
}
|
||||
});
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
//model.getCombinedSyncProgress().addListener((ov, oldValue, newValue) -> {
|
||||
// if ((double) newValue >= 1) {
|
||||
// blockchainSyncIndicator.setVisible(false);
|
||||
// blockchainSyncIndicator.setManaged(false);
|
||||
// }
|
||||
//});
|
||||
|
||||
// version
|
||||
Label versionLabel = new AutoTooltipLabel();
|
||||
|
@ -737,7 +739,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel>
|
|||
versionBox.setSpacing(10);
|
||||
versionBox.setAlignment(Pos.CENTER);
|
||||
versionBox.setAlignment(Pos.BASELINE_CENTER);
|
||||
versionBox.getChildren().addAll(versionLabel, blockchainSyncIndicator);
|
||||
versionBox.getChildren().addAll(versionLabel); //blockchainSyncIndicator removed per issue #4649
|
||||
setLeftAnchor(versionBox, 10d);
|
||||
setRightAnchor(versionBox, 10d);
|
||||
setBottomAnchor(versionBox, 7d);
|
||||
|
|
|
@ -235,8 +235,9 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
addListeners();
|
||||
addSubscriptions();
|
||||
|
||||
if (waitingForFundsSpinner != null)
|
||||
waitingForFundsSpinner.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
// if (waitingForFundsSpinner != null)
|
||||
// waitingForFundsSpinner.play();
|
||||
|
||||
amountDescriptionLabel.setText(model.getAmountDescription());
|
||||
addressTextField.setAddress(model.getAddressAsString());
|
||||
|
@ -275,8 +276,9 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
removeListeners();
|
||||
removeSubscriptions();
|
||||
|
||||
if (waitingForFundsSpinner != null)
|
||||
waitingForFundsSpinner.stop();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
//if (waitingForFundsSpinner != null)
|
||||
// waitingForFundsSpinner.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -436,7 +438,8 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
.show();
|
||||
}
|
||||
|
||||
waitingForFundsSpinner.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
// waitingForFundsSpinner.play();
|
||||
|
||||
payFundsTitledGroupBg.setVisible(true);
|
||||
totalToPayTextField.setVisible(true);
|
||||
|
@ -654,11 +657,12 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
private void addSubscriptions() {
|
||||
isWaitingForFundsSubscription = EasyBind.subscribe(model.isWaitingForFunds, isWaitingForFunds -> {
|
||||
|
||||
if (isWaitingForFunds) {
|
||||
waitingForFundsSpinner.play();
|
||||
} else {
|
||||
waitingForFundsSpinner.stop();
|
||||
}
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
//if (isWaitingForFunds) {
|
||||
// waitingForFundsSpinner.play();
|
||||
//} else {
|
||||
// waitingForFundsSpinner.stop();
|
||||
//}
|
||||
|
||||
waitingForFundsLabel.setVisible(isWaitingForFunds);
|
||||
waitingForFundsLabel.setManaged(isWaitingForFunds);
|
||||
|
|
|
@ -263,7 +263,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
addListeners();
|
||||
|
||||
if (offerAvailabilityBusyAnimation != null && !model.showPayFundsScreenDisplayed.get()) {
|
||||
offerAvailabilityBusyAnimation.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
// offerAvailabilityBusyAnimation.play();
|
||||
offerAvailabilityLabel.setVisible(true);
|
||||
offerAvailabilityLabel.setManaged(true);
|
||||
} else {
|
||||
|
@ -272,7 +273,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
}
|
||||
|
||||
if (waitingForFundsBusyAnimation != null && model.isWaitingForFunds.get()) {
|
||||
waitingForFundsBusyAnimation.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
// waitingForFundsBusyAnimation.play();
|
||||
waitingForFundsLabel.setVisible(true);
|
||||
waitingForFundsLabel.setManaged(true);
|
||||
} else {
|
||||
|
@ -528,7 +530,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
|
||||
cancelButton2.setVisible(true);
|
||||
|
||||
waitingForFundsBusyAnimation.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
//waitingForFundsBusyAnimation.play();
|
||||
|
||||
payFundsTitledGroupBg.setVisible(true);
|
||||
totalToPayTextField.setVisible(true);
|
||||
|
@ -704,7 +707,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
});
|
||||
|
||||
isWaitingForFundsSubscription = EasyBind.subscribe(model.isWaitingForFunds, isWaitingForFunds -> {
|
||||
waitingForFundsBusyAnimation.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
// waitingForFundsBusyAnimation.play();
|
||||
waitingForFundsLabel.setVisible(isWaitingForFunds);
|
||||
waitingForFundsLabel.setManaged(isWaitingForFunds);
|
||||
});
|
||||
|
|
|
@ -433,7 +433,8 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
if (GUIUtil.canCreateOrTakeOfferOrShowPopup(user, navigation)) {
|
||||
button.setDisable(true);
|
||||
cancelButton.setDisable(true);
|
||||
busyAnimation.play();
|
||||
// temporarily disabled due to high CPU usage (per issue #4649)
|
||||
// busyAnimation.play();
|
||||
if (isPlaceOffer) {
|
||||
spinnerInfoLabel.setText(Res.get("createOffer.fundsBox.placeOfferSpinnerInfo"));
|
||||
placeOfferHandlerOptional.ifPresent(Runnable::run);
|
||||
|
|
Loading…
Add table
Reference in a new issue