mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Customize action button
This commit is contained in:
parent
cf7884d864
commit
98733607d5
@ -1314,7 +1314,7 @@ textfield */
|
||||
|
||||
/********************************************************************************************************************
|
||||
* *
|
||||
* Rounded buttons *
|
||||
* Highlight buttons *
|
||||
* *
|
||||
********************************************************************************************************************/
|
||||
|
||||
@ -1352,6 +1352,19 @@ textfield */
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
.action-button:disabled {
|
||||
-fx-background-color: -bs-rd-grey-light;
|
||||
-fx-text-fill: -bs-rd-font-dark-grey;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
-fx-background-color: -bs-rd-green;
|
||||
-fx-text-fill: -bs-white;
|
||||
-fx-font-size: 0.923em;
|
||||
-fx-pref-height: 32;
|
||||
-fx-padding: 0 40 0 40;
|
||||
}
|
||||
|
||||
/********************************************************************************************************************
|
||||
* *
|
||||
* Popups *
|
||||
|
@ -29,19 +29,16 @@ public class AutoTooltipButton extends JFXButton {
|
||||
|
||||
public AutoTooltipButton() {
|
||||
super();
|
||||
//setButtonType(ButtonType.RAISED);
|
||||
}
|
||||
|
||||
public AutoTooltipButton(String text) {
|
||||
super(text);
|
||||
//setButtonType(ButtonType.RAISED);
|
||||
super(text.toUpperCase());
|
||||
}
|
||||
|
||||
public AutoTooltipButton(String text, Node graphic) {
|
||||
super(text, graphic);
|
||||
//setButtonType(ButtonType.RAISED);
|
||||
super(text.toUpperCase(), graphic);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Skin<?> createDefaultSkin() {
|
||||
return new AutoTooltipButtonSkin(this);
|
||||
|
@ -244,10 +244,10 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
||||
}
|
||||
|
||||
leftHeaderLabel.setText(Res.get("market.offerBook.buyOffersHeaderLabel", code));
|
||||
leftButton.setText(Res.get("market.offerBook.buyAltcoin", code, Res.getBaseCurrencyCode()));
|
||||
leftButton.setText(Res.get("market.offerBook.buyAltcoin", code, Res.getBaseCurrencyCode()).toUpperCase());
|
||||
|
||||
rightHeaderLabel.setText(Res.get("market.offerBook.sellOffersHeaderLabel", code));
|
||||
rightButton.setText(Res.get("market.offerBook.sellAltcoin", code, Res.getBaseCurrencyCode()));
|
||||
rightButton.setText(Res.get("market.offerBook.sellAltcoin", code, Res.getBaseCurrencyCode()).toUpperCase());
|
||||
|
||||
priceColumnLabel.set(Res.get("shared.priceWithCur", Res.getBaseCurrencyCode()));
|
||||
} else {
|
||||
@ -257,10 +257,10 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
||||
}
|
||||
|
||||
leftHeaderLabel.setText(Res.get("market.offerBook.sellOffersHeaderLabel", Res.getBaseCurrencyCode()));
|
||||
leftButton.setText(Res.get("market.offerBook.sellWithFiat", Res.getBaseCurrencyCode(), code));
|
||||
leftButton.setText(Res.get("market.offerBook.sellWithFiat", Res.getBaseCurrencyCode(), code).toUpperCase());
|
||||
|
||||
rightHeaderLabel.setText(Res.get("market.offerBook.buyOffersHeaderLabel", Res.getBaseCurrencyCode()));
|
||||
rightButton.setText(Res.get("market.offerBook.buyWithFiat", Res.getBaseCurrencyCode(), code));
|
||||
rightButton.setText(Res.get("market.offerBook.buyWithFiat", Res.getBaseCurrencyCode(), code).toUpperCase());
|
||||
|
||||
priceColumnLabel.set(Res.get("shared.priceWithCur", code));
|
||||
}
|
||||
|
@ -295,13 +295,13 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
imageView.setId("image-buy-large");
|
||||
|
||||
placeOfferButton.setId("buy-button-big");
|
||||
placeOfferButton.setText(Res.get("createOffer.placeOfferButton", Res.get("shared.buy")));
|
||||
placeOfferButton.setText(Res.get("createOffer.placeOfferButton", Res.get("shared.buy")).toUpperCase());
|
||||
nextButton.setId("buy-button");
|
||||
percentagePriceDescription.setText(Res.get("shared.belowInPercent"));
|
||||
} else {
|
||||
imageView.setId("image-sell-large");
|
||||
placeOfferButton.setId("sell-button-big");
|
||||
placeOfferButton.setText(Res.get("createOffer.placeOfferButton", Res.get("shared.sell")));
|
||||
placeOfferButton.setText(Res.get("createOffer.placeOfferButton", Res.get("shared.sell")).toUpperCase());
|
||||
nextButton.setId("sell-button");
|
||||
percentagePriceDescription.setText(Res.get("shared.aboveInPercent"));
|
||||
}
|
||||
|
@ -366,14 +366,14 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
String mirroredDirectionText = direction == OfferPayload.Direction.SELL ? Res.get("shared.buy") : Res.get("shared.sell");
|
||||
String code = selectedTradeCurrency.getCode();
|
||||
if (model.showAllTradeCurrenciesProperty.get())
|
||||
createOfferButton.setText(Res.get("offerbook.createOfferTo", directionText, Res.getBaseCurrencyCode()));
|
||||
createOfferButton.setText(Res.get("offerbook.createOfferTo", directionText, Res.getBaseCurrencyCode()).toUpperCase());
|
||||
else if (selectedTradeCurrency instanceof FiatCurrency)
|
||||
createOfferButton.setText(Res.get("offerbook.createOfferTo", directionText, Res.getBaseCurrencyCode()) + " " +
|
||||
createOfferButton.setText(Res.get("offerbook.createOfferTo", directionText, Res.getBaseCurrencyCode()).toUpperCase() + " " +
|
||||
(direction == OfferPayload.Direction.BUY ?
|
||||
Res.get("offerbook.buyWithOtherCurrency", code) :
|
||||
Res.get("offerbook.sellForOtherCurrency", code)));
|
||||
Res.get("offerbook.sellForOtherCurrency", code)).toUpperCase());
|
||||
else
|
||||
createOfferButton.setText(Res.get("offerbook.createOfferTo", mirroredDirectionText, code) + " (" + directionText + " " + Res.getBaseCurrencyCode() + ")");
|
||||
createOfferButton.setText(Res.get("offerbook.createOfferTo", mirroredDirectionText, code) + " (" + directionText + " " + Res.getBaseCurrencyCode() + ")".toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1137,6 +1137,7 @@ public class FormBuilder {
|
||||
|
||||
Button button = new AutoTooltipButton(buttonTitle);
|
||||
button.setDefaultButton(true);
|
||||
button.getStyleClass().add("action-button");
|
||||
|
||||
BusyAnimation busyAnimation = new BusyAnimation(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user