From 98733607d5ddb03d78e449312afd1b16d2a3e15a Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Fri, 14 Sep 2018 11:14:14 +0200 Subject: [PATCH] Customize action button --- desktop/src/main/java/bisq/desktop/bisq.css | 15 ++++++++++++++- .../desktop/components/AutoTooltipButton.java | 9 +++------ .../main/market/offerbook/OfferBookChartView.java | 8 ++++---- .../bisq/desktop/main/offer/MutableOfferView.java | 4 ++-- .../main/offer/offerbook/OfferBookView.java | 8 ++++---- .../main/java/bisq/desktop/util/FormBuilder.java | 1 + 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/bisq.css b/desktop/src/main/java/bisq/desktop/bisq.css index 678b34565f..bdebc6d4c1 100644 --- a/desktop/src/main/java/bisq/desktop/bisq.css +++ b/desktop/src/main/java/bisq/desktop/bisq.css @@ -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 * diff --git a/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java b/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java index feaaa4a9a5..33c7633a01 100644 --- a/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java +++ b/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java @@ -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); diff --git a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java index 46c69fc814..62c6f090cf 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java +++ b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java @@ -244,10 +244,10 @@ public class OfferBookChartView extends ActivatableViewAndModel 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")); } diff --git a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java index 6abf45dfe2..89c3c52a22 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java @@ -366,14 +366,14 @@ public class OfferBookView extends ActivatableViewAndModel