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

UI: Fix for group icon #7552

Merged
merged 3 commits into from
Mar 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/icon/IconTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public enum JabRefIcons implements JabRefIcon {
TWITTER(MaterialDesignT.TWITTER),
BLOG(MaterialDesignR.RSS),
DATE_PICKER(MaterialDesignC.CALENDAR),
DEFAULT_GROUP_ICON_COLORED(MaterialDesignP.PLAY),
DEFAULT_GROUP_ICON_COLORED(MaterialDesignR.RECORD),
DEFAULT_GROUP_ICON(MaterialDesignL.LABEL_OUTLINE),
ALL_ENTRIES_GROUP_ICON(MaterialDesignD.DATABASE),
IMPORT(MaterialDesignC.CALL_RECEIVED),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import javafx.scene.Node;
import javafx.scene.paint.Color;

import org.jabref.gui.util.ColorUtil;

import org.kordamp.ikonli.Ikon;
import org.kordamp.ikonli.javafx.FontIcon;

Expand Down Expand Up @@ -41,7 +43,11 @@ public Node getGraphicNode() {
Ikon icon = icons.get(0);
FontIcon fontIcon = FontIcon.of(icon);
fontIcon.getStyleClass().add("glyph-icon");
color.ifPresent(fontIcon::setIconColor);

// Override the default color from the css files
color.ifPresent(color -> fontIcon.setStyle(fontIcon.getStyle() +
String.format("-fx-fill: %s;", ColorUtil.toRGBCode(color))));

return fontIcon;
}

Expand Down