mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Add back manual style workaround
This commit is contained in:
parent
ce1e954236
commit
3a395bca4e
5 changed files with 24 additions and 10 deletions
|
@ -1645,12 +1645,12 @@ textfield */
|
||||||
#buy-button-big {
|
#buy-button-big {
|
||||||
-fx-font-size: 1em;
|
-fx-font-size: 1em;
|
||||||
-fx-background-color: -bs-buy;
|
-fx-background-color: -bs-buy;
|
||||||
-fx-text-fill: white;
|
-fx-text-fill: -bs-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buy-button {
|
#buy-button {
|
||||||
-fx-background-color: -bs-buy;
|
-fx-background-color: -bs-buy;
|
||||||
-fx-text-fill: white !important;
|
-fx-text-fill: -bs-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buy-button-big:hover, #buy-button:hover,
|
#buy-button-big:hover, #buy-button:hover,
|
||||||
|
@ -1660,13 +1660,13 @@ textfield */
|
||||||
|
|
||||||
#sell-button-big {
|
#sell-button-big {
|
||||||
-fx-background-color: -bs-sell;
|
-fx-background-color: -bs-sell;
|
||||||
-fx-text-fill: white;
|
-fx-text-fill: -bs-white;
|
||||||
-fx-font-size: 1em;
|
-fx-font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sell-button {
|
#sell-button {
|
||||||
-fx-background-color: -bs-sell;
|
-fx-background-color: -bs-sell;
|
||||||
-fx-text-fill: white !important;
|
-fx-text-fill: -bs-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sell-button-big:hover, #sell-button:hover,
|
#sell-button-big:hover, #sell-button:hover,
|
||||||
|
|
|
@ -37,6 +37,7 @@ import bisq.desktop.main.funds.withdrawal.WithdrawalView;
|
||||||
import bisq.desktop.main.offer.OfferView;
|
import bisq.desktop.main.offer.OfferView;
|
||||||
import bisq.desktop.main.overlays.popups.Popup;
|
import bisq.desktop.main.overlays.popups.Popup;
|
||||||
import bisq.desktop.main.overlays.windows.OfferDetailsWindow;
|
import bisq.desktop.main.overlays.windows.OfferDetailsWindow;
|
||||||
|
import bisq.desktop.util.CssTheme;
|
||||||
import bisq.desktop.util.DisplayUtils;
|
import bisq.desktop.util.DisplayUtils;
|
||||||
import bisq.desktop.util.FormBuilder;
|
import bisq.desktop.util.FormBuilder;
|
||||||
import bisq.desktop.util.GUIUtil;
|
import bisq.desktop.util.GUIUtil;
|
||||||
|
@ -1002,11 +1003,13 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
iconView.setId("image-remove");
|
iconView.setId("image-remove");
|
||||||
title = Res.get("shared.remove");
|
title = Res.get("shared.remove");
|
||||||
button.setId(null);
|
button.setId(null);
|
||||||
|
button.setStyle(CssTheme.isDarkTheme() ? "-fx-text-fill: white" : "-fx-text-fill: #444444");
|
||||||
button.setOnAction(e -> onRemoveOpenOffer(offer));
|
button.setOnAction(e -> onRemoveOpenOffer(offer));
|
||||||
} else {
|
} else {
|
||||||
boolean isSellOffer = offer.getDirection() == OfferPayload.Direction.SELL;
|
boolean isSellOffer = offer.getDirection() == OfferPayload.Direction.SELL;
|
||||||
iconView.setId(isSellOffer ? "image-buy-white" : "image-sell-white");
|
iconView.setId(isSellOffer ? "image-buy-white" : "image-sell-white");
|
||||||
button.setId(isSellOffer ? "buy-button" : "sell-button");
|
button.setId(isSellOffer ? "buy-button" : "sell-button");
|
||||||
|
button.setStyle("-fx-text-fill: white");
|
||||||
if (isSellOffer) {
|
if (isSellOffer) {
|
||||||
title = CurrencyUtil.isFiatCurrency(offer.getCurrencyCode()) ?
|
title = CurrencyUtil.isFiatCurrency(offer.getCurrencyCode()) ?
|
||||||
Res.get("offerbook.takeOfferToBuy", offer.getOfferPayload().getBaseCurrencyCode()) :
|
Res.get("offerbook.takeOfferToBuy", offer.getOfferPayload().getBaseCurrencyCode()) :
|
||||||
|
|
|
@ -127,6 +127,7 @@
|
||||||
-bs-progress-bar-track: #272728;
|
-bs-progress-bar-track: #272728;
|
||||||
-bs-chart-tick: rgba(255, 255, 255, 0.7);
|
-bs-chart-tick: rgba(255, 255, 255, 0.7);
|
||||||
-bs-chart-lines: rgba(0, 0, 0, 0.3);
|
-bs-chart-lines: rgba(0, 0, 0, 0.3);
|
||||||
|
-bs-white: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* list view */
|
/* list view */
|
||||||
|
|
|
@ -100,4 +100,5 @@
|
||||||
-fx-selection-bar-non-focused: -fx-selection-bar;
|
-fx-selection-bar-non-focused: -fx-selection-bar;
|
||||||
-fx-default-button: derive(-fx-accent, 95%);
|
-fx-default-button: derive(-fx-accent, 95%);
|
||||||
-bs-progress-bar-track: #e0e0e0;
|
-bs-progress-bar-track: #e0e0e0;
|
||||||
|
-bs-white: white;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,14 @@ public class CssTheme {
|
||||||
public static final int CSS_THEME_LIGHT = 0;
|
public static final int CSS_THEME_LIGHT = 0;
|
||||||
public static final int CSS_THEME_DARK = 1;
|
public static final int CSS_THEME_DARK = 1;
|
||||||
|
|
||||||
|
private static int currentCSSTheme;
|
||||||
|
|
||||||
public static void loadSceneStyles(Scene scene, int cssTheme) {
|
public static void loadSceneStyles(Scene scene, int cssTheme) {
|
||||||
String cssThemeFolder = "/bisq/desktop/";
|
String cssThemeFolder = "/bisq/desktop/";
|
||||||
String cssThemeFile = "";
|
String cssThemeFile = "";
|
||||||
|
|
||||||
|
currentCSSTheme = cssTheme;
|
||||||
|
|
||||||
switch (cssTheme) {
|
switch (cssTheme) {
|
||||||
|
|
||||||
case CSS_THEME_DARK:
|
case CSS_THEME_DARK:
|
||||||
|
@ -49,4 +53,9 @@ public class CssTheme {
|
||||||
cssThemeFolder + cssThemeFile
|
cssThemeFolder + cssThemeFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isDarkTheme() {
|
||||||
|
return currentCSSTheme == CSS_THEME_DARK;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue