From d5cf698b14fe6b5af1aeca37df00b11e9f5696ce Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Mon, 28 Oct 2019 10:49:34 +0100 Subject: [PATCH] Fix style issues with dark mode --- desktop/src/main/java/bisq/desktop/bisq.css | 14 ++++++++++++-- .../desktop/components/InfoAutoTooltipLabel.java | 1 + .../main/java/bisq/desktop/util/FormBuilder.java | 14 +++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/bisq.css b/desktop/src/main/java/bisq/desktop/bisq.css index e0ef905de16..89c9dc0df51 100644 --- a/desktop/src/main/java/bisq/desktop/bisq.css +++ b/desktop/src/main/java/bisq/desktop/bisq.css @@ -783,11 +783,15 @@ tree-table-view:focused { } .close-icon { - -fx-text-fill: -bs-text-color; + -fx-fill: -bs-text-color; } .close-icon:hover { - -fx-text-fill: -fx-accent; + -fx-fill: -fx-accent; +} + +.tooltip-icon { + -fx-fill: -bs-text-color; } /******************************************************************************* @@ -2040,3 +2044,9 @@ textfield */ .popover > .content { -fx-padding: 10; } + +.popover > .content .default-text { + -fx-text-fill: -bs-text-color; +} + + diff --git a/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java b/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java index 5daaf41b4a5..0f08bdf92e7 100644 --- a/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java +++ b/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java @@ -81,6 +81,7 @@ public void hideIcon() { private void positionAndActivateIcon(ContentDisplay contentDisplay, String info, double width) { textIcon.setOpacity(0.4); + textIcon.getStyleClass().add("tooltip-icon"); textIcon.setOnMouseEntered(e -> { hidePopover = false; diff --git a/desktop/src/main/java/bisq/desktop/util/FormBuilder.java b/desktop/src/main/java/bisq/desktop/util/FormBuilder.java index aa174600e97..85d70513bbc 100644 --- a/desktop/src/main/java/bisq/desktop/util/FormBuilder.java +++ b/desktop/src/main/java/bisq/desktop/util/FormBuilder.java @@ -2107,14 +2107,14 @@ public static Button getIconButton(GlyphIcons icon, String styleClass) { public static Button getIconButton(GlyphIcons icon, String styleClass, String iconSize) { if (icon.fontFamily().equals(MATERIAL_DESIGN_ICONS)) { - Button textIcon = MaterialDesignIconFactory.get().createIconButton(icon, + Button iconButton = MaterialDesignIconFactory.get().createIconButton(icon, "", iconSize, null, ContentDisplay.CENTER); - textIcon.setId("icon-button"); - textIcon.getGraphic().getStyleClass().add(styleClass); - textIcon.setPrefWidth(20); - textIcon.setPrefHeight(20); - textIcon.setPadding(new Insets(0)); - return textIcon; + iconButton.setId("icon-button"); + iconButton.getGraphic().getStyleClass().add(styleClass); + iconButton.setPrefWidth(20); + iconButton.setPrefHeight(20); + iconButton.setPadding(new Insets(0)); + return iconButton; } else { throw new IllegalArgumentException("Not supported icon type"); }