Skip to content

Commit

Permalink
Dark mode fixes
Browse files Browse the repository at this point in the history
Edited dark theme scrollbar fix to dark.css to overwrite color -jr-scrollbar-thumb and -jr-scrollbar-track in dark.css. Switched base theme background for group selection number highlight back to green. Added dark theme to OO/Libreoffice style selection pane.

fixes JabRef#5646
  • Loading branch information
ageofadz committed Nov 23, 2019
1 parent 99d6994 commit aa06737
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.types.StandardEntryType;
import org.jabref.preferences.PreferencesService;
import org.jabref.preferences.JabRefPreferences;

import com.airhacks.afterburner.views.ViewLoader;
import org.fxmisc.easybind.EasyBind;
Expand All @@ -48,7 +47,6 @@ public class StyleSelectDialogView extends BaseDialog<OOBibStyle> {
private StyleSelectDialogViewModel viewModel;
private PreviewViewer previewArticle;
private PreviewViewer previewBook;
JabRefPreferences prefs = JabRefPreferences.getInstance();

public StyleSelectDialogView(StyleLoader loader) {

Expand Down Expand Up @@ -80,8 +78,8 @@ private void initialize() {
previewBook.setEntry(TestEntry.getTestEntryBook());
vbox.getChildren().add(previewBook);

previewArticle.setTheme(prefs.get(JabRefPreferences.FX_THEME));
previewBook.setTheme(prefs.get(JabRefPreferences.FX_THEME));
previewArticle.setTheme(preferencesService.getTheme());
previewBook.setTheme(preferencesService.getTheme());

colName.setCellValueFactory(cellData -> cellData.getValue().nameProperty());
colJournals.setCellValueFactory(cellData -> cellData.getValue().journalsProperty());
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/preferences/JabRefPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,10 @@ public String getUser() {
}
}

public String getTheme() {
return get(FX_THEME);
}

/**
* Get a Map of default tab names to deafult tab fields.
* The fields are returned as a String with fields separated by ;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/jabref/preferences/PreferencesService.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public interface PreferencesService {

String getUser();

String getTheme();

SaveOrderConfig loadExportSaveOrder();

void storeExportSaveOrder(SaveOrderConfig config);
Expand Down

0 comments on commit aa06737

Please # to comment.