Repository navigation
[Port to black-forest] Fix icons keeping large size after decreasing font size - #14
Open
jabref-machine wants to merge 1 commit into
Open
jabref-machine wants to merge 1 commit into
jabref-machine wants to merge 1 commit into
Conversation
### Summary > Icons kept their large size after the font size was lowered (e.g. 9 -> 20 -> 9) until JabRef was restarted. Ikonli's FontIcon writes inline -fx-font-size: Npx - [FontIcon.java](https://github.com/kordamp/ikonli/blob/v12.4.0/core/ikonli-javafx/src/main/java/org/kordamp/ikonli/javafx/FontIcon.java#L145) & also JabRef's using CSS JavaFx provide font-size in pt (point) and Ikonli process in px (pixel) by default. This inline style beats the font-size-N in [jabref-base.css](https://github.com/JabRef/jabref/blob/main/jabgui/src/main/resources/org/jabref/gui/theme/internal/jabref-base.css#L71-L83) and icon stays large. Added ThemeSizedFontIcon in IkonliIcon.java. This also fixes File menu too including Side pane Group search & Web search, Library tab , Main table, Entry editor which were mentioned in the issue because they were all affected. ### Steps to test 1. Open File > Preferences > General. 2. Enable "Override default font size", set 20 and save. <img width="1426" height="942" alt="image" src="https://github.com/user-attachments/assets/3f2d7936-979c-4a8d-a9d2-552df9b9e60f" /> <img width="747" height="1078" alt="image" src="https://github.com/user-attachments/assets/211737be-8472-494f-9c3a-7bad0bd60ce9" /> 3. Repeat Step 1. and 2. but now keep font 9. <img width="1667" height="1046" alt="image" src="https://github.com/user-attachments/assets/28677fb3-b860-4230-9e85-22c15356b571" /> 4. Open File menu, Side pane, three-way merge dialog, group pane etc. 6. All icons are restored to original size, without a restart. <img width="365" height="533" alt="image" src="https://github.com/user-attachments/assets/4483a735-36fa-4a4c-942a-bae380e41df2" /> <img width="370" height="715" alt="image" src="https://github.com/user-attachments/assets/58339a62-88f0-4430-aa44-5df6b20ef462" /> <img width="815" height="220" alt="image" src="https://github.com/user-attachments/assets/4ab58c7a-db9d-4968-a3f5-8957bff575cd" /> ### Related issues and pull requests Closes JabRef#17556 ### Checklist - [x] I own the copyright of the code submitted and I license it under the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE) - [x] If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code - [x] I manually tested my changes in running JabRef (always required) - [x] I added JUnit tests for changes (if applicable) - [x] I added screenshots in the PR description (if change is visible to the user) - [x] I added **one sentence (max 20 words)** to `CHANGELOG.md` describing the change from the user's point of view (if the change is visible to the user) - [x] I checked the [user documentation](https://docs.jabref.org/) for up to dateness and submitted a pull request to our [user documentation repository](https://github.com/JabRef/user-documentation/tree/main/en) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> (cherry picked from commit afe3418)
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of JabRef#17563 to
black-forest, see Branching strategy.If this PR is a draft, the cherry-pick conflicted: the conflicting files are committed with Git's conflict markers left in. Resolve the markers locally, push, and mark the PR ready.