Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix style issues #3876

Merged
merged 6 commits into from Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1294,7 +1294,7 @@ private void addAmountPriceFields() {
Res.get("shared.distanceInPercent"));
percentagePriceDescription = priceAsPercentageInputBoxTuple.first;

getSmallIconForLabel(MaterialDesignIcon.CHART_LINE, percentagePriceDescription);
getSmallIconForLabel(MaterialDesignIcon.CHART_LINE, percentagePriceDescription, "small-icon-label");

percentagePriceBox = priceAsPercentageInputBoxTuple.second;

Expand Down Expand Up @@ -1367,7 +1367,7 @@ private void addSecondRow() {
Tuple2<Label, VBox> priceInputBoxTuple = getTradeInputBox(priceValueCurrencyBox, "");
priceDescriptionLabel = priceInputBoxTuple.first;

getSmallIconForLabel(MaterialDesignIcon.LOCK, priceDescriptionLabel);
getSmallIconForLabel(MaterialDesignIcon.LOCK, priceDescriptionLabel, "small-icon-label");

editOfferElements.add(priceDescriptionLabel);
fixedPriceBox = priceInputBoxTuple.second;
Expand Down
Expand Up @@ -1106,7 +1106,7 @@ private void addAmountPriceFields() {
Res.get("takeOffer.amountPriceBox.priceDescription"));
priceDescriptionLabel = priceInputBoxTuple.first;

getSmallIconForLabel(MaterialDesignIcon.LOCK, priceDescriptionLabel);
getSmallIconForLabel(MaterialDesignIcon.LOCK, priceDescriptionLabel, "small-icon-label");

VBox priceBox = priceInputBoxTuple.second;

Expand Down Expand Up @@ -1145,7 +1145,7 @@ private void addSecondRow() {
Res.get("shared.distanceInPercent"));
priceAsPercentageDescription = priceAsPercentageInputBoxTuple.first;

getSmallIconForLabel(MaterialDesignIcon.CHART_LINE, priceAsPercentageDescription);
getSmallIconForLabel(MaterialDesignIcon.CHART_LINE, priceAsPercentageDescription, "small-icon-label");

priceAsPercentageInputBox = priceAsPercentageInputBoxTuple.second;

Expand Down
6 changes: 6 additions & 0 deletions desktop/src/main/java/bisq/desktop/theme-dark.css
Expand Up @@ -248,11 +248,17 @@
.scroll-bar:vertical .thumb:hover {
-fx-background-color: -bs-color-gray-5;
}

.scroll-bar:horizontal .thumb:pressed,
.scroll-bar:vertical .thumb:pressed {
-fx-background-color: -bs-color-gray-4;
}

.scroll-bar:vertical:focused,
.scroll-bar:horizontal:focused {
-fx-background-color: transparent, -bs-color-gray-4, -bs-color-gray-4;
}

.small-icon-label {
-fx-fill: -bs-text-color;
}
13 changes: 12 additions & 1 deletion desktop/src/main/java/bisq/desktop/util/FormBuilder.java
Expand Up @@ -2045,10 +2045,13 @@ public static void removeRowsFromGridPane(GridPane gridPane, int fromGridRow, in
// Icons
///////////////////////////////////////////////////////////////////////////////////////////

public static Text getIconForLabel(GlyphIcons icon, String iconSize, Label label) {
public static Text getIconForLabel(GlyphIcons icon, String iconSize, Label label, String style) {
if (icon.fontFamily().equals(MATERIAL_DESIGN_ICONS)) {
final Text textIcon = MaterialDesignIconFactory.get().createIcon(icon, iconSize);
textIcon.setOpacity(0.7);
if (style != null) {
textIcon.getStyleClass().add(style);
}
label.setContentDisplay(ContentDisplay.LEFT);
label.setGraphic(textIcon);
return textIcon;
Expand All @@ -2057,6 +2060,14 @@ public static Text getIconForLabel(GlyphIcons icon, String iconSize, Label label
}
}

public static Text getIconForLabel(GlyphIcons icon, String iconSize, Label label) {
return getIconForLabel(icon, iconSize, label, null);
}

public static Text getSmallIconForLabel(GlyphIcons icon, Label label, String style) {
return getIconForLabel(icon, "0.769em", label, style);
}

public static Text getSmallIconForLabel(GlyphIcons icon, Label label) {
return getIconForLabel(icon, "0.769em", label);
}
Expand Down