Skip to content

Commit

Permalink
Fix icon color (#7994)
Browse files Browse the repository at this point in the history
* Fix icon color

* Fix group tree icon color

* Fix preferences icon

* Changelog
  • Loading branch information
calixtus authored Aug 16, 2021
1 parent 97941ba commit 5471781
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
### Fixed

- We fixed an issue when checking for a new version when JabRef is used behind a corporate proxy. [#7884](https://github.com/JabRef/jabref/issues/7884)
- We fixed some icons that were drawn in the wrong color when JabRef used a custom theme. [#7853](https://github.com/JabRef/jabref/issues/7853)
- We fixed an issue where the `Aux file` on `Edit group` doesn't support relative sub-directories path to import. [#7719](https://github.com/JabRef/jabref/issues/7719).
- We fixed an issue where it was impossible to add or modify groups. [#7912](https://github.com/JabRef/jabref/pull/793://github.com/JabRef/jabref/pull/7921)
- We fixed an issue where exported entries from a Citavi bib containing URLs could not be imported [#7892](https://github.com/JabRef/jabref/issues/7882)
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@
-fx-fill: -fx-text-base-color;
}

.ikonli-font-icon {
-fx-icon-color: -fx-text-base-color;
}

.tooltip {
-fx-background-color: -jr-tooltip-bg;
-fx-opacity: 95%;
Expand Down Expand Up @@ -859,10 +863,12 @@
-fx-padding: 0.3em 0.9em 0.3em 0.9em;
}

.sidePaneComponentHeader .glyph-icon {
.sidePaneComponentHeader .glyph-icon,
.sidePaneComponentHeader .ikonli-font-icon {
-fx-fill: -jr-sidepane-header-color;
-fx-text-fill: -jr-sidepane-header-color;
-fx-font-size: 16px;
-fx-icon-color: -jr-theme-text;
}

.mainMenu {
Expand Down Expand Up @@ -938,10 +944,12 @@
-fx-border-width: 0;
}

.mainToolbar .glyph-icon {
.mainToolbar .glyph-icon,
.mainToolbar .ikonli-font-icon {
-fx-font-size: 1.7em;
-fx-fill: -jr-theme-text;
-fx-text-fill: -jr-theme-text;
-fx-icon-color: -jr-theme-text;
}

.mainToolbar .search-field {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/actions/StandardActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ public enum StandardActions implements Action {
SETUP_GENERAL_FIELDS(Localization.lang("Set up general fields")),
MANAGE_PROTECTED_TERMS(Localization.lang("Manage protected terms")),
CITATION_KEY_PATTERN(Localization.lang("Citation key patterns")),
SHOW_PREFS(Localization.lang("Preferences")),
SHOW_PREFS(Localization.lang("Preferences"), IconTheme.JabRefIcons.PREFERENCES),
MANAGE_JOURNALS(Localization.lang("Manage journal abbreviations")),
CUSTOMIZE_KEYBINDING(Localization.lang("Customize key bindings"), IconTheme.JabRefIcons.KEY_BINDINGS),
MANAGE_CONTENT_SELECTORS(Localization.lang("Manage content selectors"), IconTheme.JabRefIcons.PREFERENCES),
MANAGE_CONTENT_SELECTORS(Localization.lang("Manage content selectors"), IconTheme.JabRefIcons.SELECTORS),
MANAGE_CITE_KEY_PATTERNS(Localization.lang("Citation key patterns")),

EDIT_ENTRY(Localization.lang("Open entry editor"), IconTheme.JabRefIcons.EDIT_ENTRY, KeyBinding.EDIT_ENTRY),
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/gui/icon/IconTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ public enum JabRefIcons implements JabRefIcon {
SEARCH(MaterialDesignM.MAGNIFY),
FILE_SEARCH(MaterialDesignF.FILE_FIND),
ADVANCED_SEARCH(Color.CYAN, MaterialDesignM.MAGNIFY),
PREFERENCES(MaterialDesignS.STAR_SETTINGS),
PREFERENCES(MaterialDesignC.COG),
SELECTORS(MaterialDesignS.STAR_SETTINGS),
HELP(MaterialDesignH.HELP_CIRCLE),
UP(MaterialDesignA.ARROW_UP),
DOWN(MaterialDesignA.ARROW_DOWN),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public Node getGraphicNode() {

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

return fontIcon;
}
Expand Down

0 comments on commit 5471781

Please sign in to comment.