From 26044d8ce183291bdce3ed1d9d610623382f8f05 Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Thu, 19 Dec 2019 11:23:44 +0100 Subject: [PATCH 1/2] Not use style workaround After some testing on Regtest it seems that this workaround is no longer needed. This fixes the issue for the remove button mentioned in #3185. --- .../java/bisq/desktop/main/offer/offerbook/OfferBookView.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 62bc387883b..4fdc386e200 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 @@ -65,8 +65,8 @@ import org.bitcoinj.core.Coin; -import javax.inject.Named; import javax.inject.Inject; +import javax.inject.Named; import de.jensd.fx.glyphs.GlyphIcons; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; @@ -1002,13 +1002,11 @@ public void updateItem(final OfferBookListItem newItem, boolean empty) { iconView.setId("image-remove"); title = Res.get("shared.remove"); button.setId("cancel-button"); - button.setStyle("-fx-text-fill: #444;"); // does not take the font colors sometimes from the style button.setOnAction(e -> onRemoveOpenOffer(offer)); } else { boolean isSellOffer = offer.getDirection() == OfferPayload.Direction.SELL; iconView.setId(isSellOffer ? "image-buy-white" : "image-sell-white"); button.setId(isSellOffer ? "buy-button" : "sell-button"); - button.setStyle("-fx-text-fill: white;"); // does not take the font colors sometimes from the style if (isSellOffer) { title = CurrencyUtil.isFiatCurrency(offer.getCurrencyCode()) ? Res.get("offerbook.takeOfferToBuy", offer.getOfferPayload().getBaseCurrencyCode()) : From 35ef9b62f9a4019d87f275164b39339f45d963e7 Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Thu, 19 Dec 2019 11:35:48 +0100 Subject: [PATCH 2/2] Fix wrong styling of link icon in dark mode It also removes a style workaround that is not needed anymore. Side note: the style that was set never existed anyways. --- desktop/src/main/java/bisq/desktop/bisq.css | 2 ++ .../main/java/bisq/desktop/components/HyperlinkWithIcon.java | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/bisq.css b/desktop/src/main/java/bisq/desktop/bisq.css index f8e23875636..82e8c86c5c9 100644 --- a/desktop/src/main/java/bisq/desktop/bisq.css +++ b/desktop/src/main/java/bisq/desktop/bisq.css @@ -838,6 +838,7 @@ textfield */ -fx-border-width: 0px; -fx-underline: true; -fx-text-fill: -bs-rd-font-dark; + -fx-fill: -bs-rd-font-dark; } .hyperlink.no-underline { @@ -846,6 +847,7 @@ textfield */ .hyperlink:hover { -fx-text-fill: -bs-text-color; + -fx-fill: -bs-text-color; } .hyperlink:hover, diff --git a/desktop/src/main/java/bisq/desktop/components/HyperlinkWithIcon.java b/desktop/src/main/java/bisq/desktop/components/HyperlinkWithIcon.java index c9504c9da40..8834e001a9f 100644 --- a/desktop/src/main/java/bisq/desktop/components/HyperlinkWithIcon.java +++ b/desktop/src/main/java/bisq/desktop/components/HyperlinkWithIcon.java @@ -81,9 +81,6 @@ private void setIcon(Node icon) { setContentDisplay(ContentDisplay.RIGHT); setGraphicTextGap(7.0); - - //TODO: replace workaround of setting the style this way - tooltipProperty().addListener((observable, oldValue, newValue) -> newValue.getStyleClass().add("tooltip-hyperlink-icon")); } public void clear() {