Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Theme Visibility Fixes #5646

Merged
merged 7 commits into from
Nov 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an exception which occurred when an invalid jstyle was loaded. [#5452](https://github.com/JabRef/jabref/issues/5452)
- We fixed an error where the preview theme did not adapt to the "Dark" mode [#5463](https://github.com/JabRef/jabref/issues/5463)
- We fixed an issue where the merge dialog showed the wrong text colour in "Dark" mode [#5516](https://github.com/JabRef/jabref/issues/5516)
- We fixed visibility issues with the scrollbar and group selection highlight in "Dark" mode, and enabled "Dark" mode for the OpenOffice preview in the style selection window. [#5522](https://github.com/JabRef/jabref/issues/5522)
- We fixed an issue where the author field was not correctly parsed during bibtex key-generation. [#5551](https://github.com/JabRef/jabref/issues/5551)
- We fixed an issue where notifications where shown during autosave. [#5555](https://github.com/JabRef/jabref/issues/5555)
- We fixed an issue where the side pane was not remembering its position. [#5615](https://github.com/JabRef/jabref/issues/5615)
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,14 @@
-fx-padding: 0 0 0 0;
}

.numberColumn > .hits:any-selected {
-fx-background-color: derive(-jr-green, 70%);
}

.numberColumn > .hits:all-selected {
-fx-background-color: -jr-green;
}

.table-view {
-fx-background-insets: 0;
-fx-padding: 0;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/jabref/gui/Dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
-jr-menu-item-foreground: -fx-light-text-color;
-jr-menu-forground-active: derive(-fx-light-text-color, 50%);

-jr-scrollbar-thumb: derive(-fx-outer-border, -30%);
-jr-scrollbar-track: derive(-fx-control-inner-background, -90%);

-fx-focused-text-base-color: -fx-dark-text-color;

-jr-tooltip-fg: derive(-fx-light-text-color, 50%);
Expand All @@ -64,3 +67,10 @@
-fx-background-color: -fx-light-text-color, -fx-control-inner-background;
}

.numberColumn > .hits:any-selected {
-fx-background-color: derive(-jr-gray-3, 70%);
}

.numberColumn > .hits:all-selected {
-fx-background-color: -jr-gray-3;
}
8 changes: 0 additions & 8 deletions src/main/java/org/jabref/gui/groups/GroupTree.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@
-fx-fill: -jr-group-hits-fg;
}

.numberColumn > .hits:any-selected {
-fx-background-color: derive(-jr-green, 70%);
}

.numberColumn > .hits:all-selected {
-fx-background-color: -jr-green;
}

.disclosureNodeColumn {
-fx-alignment: top-right;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ private void initialize() {
previewBook.setEntry(TestEntry.getTestEntryBook());
vbox.getChildren().add(previewBook);

previewArticle.setTheme(preferencesService.getTheme());
previewBook.setTheme(preferencesService.getTheme());

colName.setCellValueFactory(cellData -> cellData.getValue().nameProperty());
colJournals.setCellValueFactory(cellData -> cellData.getValue().journalsProperty());
colFile.setCellValueFactory(cellData -> cellData.getValue().fileProperty());
Expand Down
5 changes: 5 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,11 @@ public String getUser() {
}
}

@Override
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