diff --git a/CHANGELOG.md b/CHANGELOG.md index d12ff9edf47..442771bce92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Fixed +- We fixed the wrong behavior that font size changes are not reflected in dialogs. [#6039](https://github.com/JabRef/jabref/issues/6039) + ### Removed diff --git a/src/main/java/org/jabref/gui/util/BaseDialog.java b/src/main/java/org/jabref/gui/util/BaseDialog.java index 1995d34ce7d..d0c46ef6935 100644 --- a/src/main/java/org/jabref/gui/util/BaseDialog.java +++ b/src/main/java/org/jabref/gui/util/BaseDialog.java @@ -2,6 +2,7 @@ import java.util.Optional; +import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.ButtonType; import javafx.scene.control.Dialog; @@ -14,6 +15,8 @@ import org.jabref.gui.keyboard.KeyBinding; import org.jabref.gui.keyboard.KeyBindingRepository; +import com.tobiasdiez.easybind.EasyBind; + public class BaseDialog extends Dialog implements org.jabref.gui.Dialog { protected BaseDialog() { @@ -36,7 +39,10 @@ protected BaseDialog() { setDialogIcon(IconTheme.getJabRefImageFX()); setResizable(true); - Globals.prefs.getTheme().installCss(getDialogPane().getScene()); + + EasyBind.wrapNullable(dialogPaneProperty()) + .mapObservable(Node::sceneProperty) + .subscribeToValues(scene -> Globals.prefs.getTheme().installCss(scene)); } private Optional