Add back manual style workaround

This commit is contained in:
Christoph Atteneder 2020-01-08 21:24:21 +01:00
parent ce1e954236
commit 3a395bca4e
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
5 changed files with 24 additions and 10 deletions

View file

@ -1645,12 +1645,12 @@ textfield */
#buy-button-big {
-fx-font-size: 1em;
-fx-background-color: -bs-buy;
-fx-text-fill: white;
-fx-text-fill: -bs-white;
}
#buy-button {
-fx-background-color: -bs-buy;
-fx-text-fill: white !important;
-fx-text-fill: -bs-white;
}
#buy-button-big:hover, #buy-button:hover,
@ -1660,13 +1660,13 @@ textfield */
#sell-button-big {
-fx-background-color: -bs-sell;
-fx-text-fill: white;
-fx-text-fill: -bs-white;
-fx-font-size: 1em;
}
#sell-button {
-fx-background-color: -bs-sell;
-fx-text-fill: white !important;
-fx-text-fill: -bs-white;
}
#sell-button-big:hover, #sell-button:hover,

View file

@ -37,6 +37,7 @@ import bisq.desktop.main.funds.withdrawal.WithdrawalView;
import bisq.desktop.main.offer.OfferView;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.main.overlays.windows.OfferDetailsWindow;
import bisq.desktop.util.CssTheme;
import bisq.desktop.util.DisplayUtils;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.GUIUtil;
@ -1002,11 +1003,13 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
iconView.setId("image-remove");
title = Res.get("shared.remove");
button.setId(null);
button.setStyle(CssTheme.isDarkTheme() ? "-fx-text-fill: white" : "-fx-text-fill: #444444");
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");
if (isSellOffer) {
title = CurrencyUtil.isFiatCurrency(offer.getCurrencyCode()) ?
Res.get("offerbook.takeOfferToBuy", offer.getOfferPayload().getBaseCurrencyCode()) :

View file

@ -127,6 +127,7 @@
-bs-progress-bar-track: #272728;
-bs-chart-tick: rgba(255, 255, 255, 0.7);
-bs-chart-lines: rgba(0, 0, 0, 0.3);
-bs-white: white;
}
/* list view */

View file

@ -100,4 +100,5 @@
-fx-selection-bar-non-focused: -fx-selection-bar;
-fx-default-button: derive(-fx-accent, 95%);
-bs-progress-bar-track: #e0e0e0;
-bs-white: white;
}

View file

@ -23,10 +23,14 @@ public class CssTheme {
public static final int CSS_THEME_LIGHT = 0;
public static final int CSS_THEME_DARK = 1;
private static int currentCSSTheme;
public static void loadSceneStyles(Scene scene, int cssTheme) {
String cssThemeFolder = "/bisq/desktop/";
String cssThemeFile = "";
currentCSSTheme = cssTheme;
switch (cssTheme) {
case CSS_THEME_DARK:
@ -40,13 +44,18 @@ public class CssTheme {
}
scene.getStylesheets().setAll(
// load base styles first
cssThemeFolder + "bisq.css",
cssThemeFolder + "images.css",
cssThemeFolder + "CandleStickChart.css",
// load base styles first
cssThemeFolder + "bisq.css",
cssThemeFolder + "images.css",
cssThemeFolder + "CandleStickChart.css",
// load theme last to allow override
cssThemeFolder + cssThemeFile
// load theme last to allow override
cssThemeFolder + cssThemeFile
);
}
public static boolean isDarkTheme() {
return currentCSSTheme == CSS_THEME_DARK;
}
}