[WIP] Turn editor fontsize customizable#3042
Conversation
tobiasdiez
left a comment
There was a problem hiding this comment.
It should suffice to add the font style globally at https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java#L180 since the children automatically derive their properties from their parents (similar to css + html).
|
Thanks for the tip, I will try it out! :) |
|
See also this article for an inspiration: https://fxdocs.github.io/docs/index.html#_styleable_properties |
|
The style inheritance works for some items, but not for all (such as context menu items). Some of the buttons are defined in FXML and their tooltips are defined in FXML. @Siedlerchr @tobiasdiez Any tipps on how to make the font size customizable for these items? Moreover, how does this work with localization? |
|
You should be able to style the context menu (and similar the tooltip) by using appropiate css tags, e.g. .context-menu {
-fx-font-size: Globals.prefs.getInt(JabRefPreferences.MENU_FONT_SIZE) + "pt;");
}It is probably enough to specify this once for the entry editor tab. |
# Conflicts: # CHANGELOG.md
| + "text-area-foreground: " + convertToHex(GUIGlobals.editorTextColor) + ";" | ||
| + "text-area-highlight: " + convertToHex(GUIGlobals.activeBackgroundColor) + ";"); | ||
| + "text-area-highlight: " + convertToHex(GUIGlobals.activeBackgroundColor) + ";" | ||
| + "text-area-font-size: " + Globals.prefs.getInt(JabRefPreferences.MENU_FONT_SIZE) + "pt;"); |
There was a problem hiding this comment.
adding + "-fx-font-size: 20pt;" here without any other code changes seems to do the trick.
|
#3034 supersedes this PR, therefore I am closing it. |
Partial fix for #3034
The components in the entry edtor now use the menu font size that can be set in the preferences.
Missing:
The text field of the Crossref editor
The recommendations by the auto completion
The tooltip text for the buttons
Change in CHANGELOG.md described
Tests created for changes
Screenshots added (for bigger UI changes)
Manually tested changed features in running JabRef
Check documentation status (Issue created for outdated help page at help.jabref.org?)
If you changed the localization: Did you run
gradle localizationUpdate?