From bcf800412f76f4e3e200af51e25bed6271bb5a9e Mon Sep 17 00:00:00 2001 From: Nils Streijffert Date: Wed, 26 Feb 2020 18:30:20 +0100 Subject: [PATCH] Add functionality to let the user import custom CSS file #5790 * Add CSS file type, add button in preferences to import a custom CSS file, started on import functionality * Change so that the log uses format specifiers instead of string concatenation * Add RadioButton for toggling custom theme * Add preference for setting the path to custom CSS theme * Load custom CSS if toggled * Add missing language keys * Remove check if the current theme is applied again, the check is removed since we don't need it * Save path to the custom CSS file in program preferences --- .../jabref/gui/preferences/AppearanceTab.fxml | 1 + .../gui/preferences/AppearanceTabView.java | 3 ++- .../preferences/AppearanceTabViewModel.java | 13 +++++++++- .../gui/preferences/PreferencesDialog.fxml | 5 ++++ .../preferences/PreferencesDialogView.java | 3 +++ .../PreferencesDialogViewModel.java | 15 +++++++++++ .../java/org/jabref/gui/util/ThemeLoader.java | 26 ++++++++++++++----- .../jabref/logic/util/StandardFileType.java | 3 ++- .../jabref/preferences/JabRefPreferences.java | 21 +++++++++++---- src/main/resources/l10n/JabRef_en.properties | 9 +++++++ 10 files changed, 84 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml b/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml index ed2f9605c5e..ee90e52a715 100644 --- a/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml +++ b/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml @@ -29,4 +29,5 @@