Skip to content

Commit 858ffd8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into convertSearchWorker
* upstream/master: Fix background color of dialogs in dark mode (#4994) NPE-fix for Preferences/Ext-Prog/Settings for X/Browse (#4983) Bump richtextfx from 0.10.0 to 0.10.1 (#4989) Bump tika-core from 1.20 to 1.21 (#4984)
2 parents 32925d8 + d3b193c commit 858ffd8

10 files changed

+35
-13
lines changed

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ dependencies {
9494
compile 'org.apache.pdfbox:fontbox:2.0.15'
9595
compile 'org.apache.pdfbox:xmpbox:2.0.15'
9696

97-
compile group: 'org.apache.tika', name: 'tika-core', version: '1.20'
97+
compile group: 'org.apache.tika', name: 'tika-core', version: '1.21'
9898

9999
// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
100100
compile 'org.bouncycastle:bcprov-jdk15on:1.61'
@@ -130,7 +130,7 @@ dependencies {
130130
compile 'de.saxsys:mvvmfx:1.8.0'
131131
compile 'org.fxmisc.easybind:easybind:1.0.3'
132132
compile 'org.fxmisc.flowless:flowless:0.6.1'
133-
compile 'org.fxmisc.richtext:richtextfx:0.10.0'
133+
compile 'org.fxmisc.richtext:richtextfx:0.10.1'
134134
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
135135
compile 'javax.inject:javax.inject:1'
136136
compile 'com.jfoenix:jfoenix:8.0.8'

src/main/java/org/jabref/gui/Base.css

+4
Original file line numberDiff line numberDiff line change
@@ -1032,3 +1032,7 @@ We want to have a look that matches our icons in the tool-bar */
10321032
-fx-font-size: 1.5em;
10331033
-fx-padding: 1em 0em 1em 0em;
10341034
}
1035+
1036+
.dialog-pane {
1037+
-fx-background-color: -fx-control-inner-background;
1038+
}

src/main/java/org/jabref/gui/help/AboutDialog.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
.about-heading {
22
-fx-font-size: 30;
3+
-fx-text-fill: -jr-theme;
34
}
45

56
.about-heading:pressed {
6-
-fx-text-fill: -fx-focus-color;
7+
-fx-text-fill: -jr-selected;
78
}
89

910
.top-padding {
@@ -33,7 +34,7 @@
3334
}
3435

3536
.info-sections {
36-
-fx-padding: 5px;
37+
-fx-padding: 5px;
3738
}
3839

3940
.logo-pane {

src/main/java/org/jabref/gui/preferences/ExternalTab.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.jabref.gui.push.PushToApplication;
2020
import org.jabref.gui.push.PushToApplicationSettings;
2121
import org.jabref.gui.push.PushToApplicationSettingsDialog;
22-
import org.jabref.gui.push.PushToApplicationsManager;
2322
import org.jabref.gui.util.FileDialogConfiguration;
2423
import org.jabref.logic.l10n.Localization;
2524
import org.jabref.logic.util.OS;
@@ -28,6 +27,7 @@
2827

2928
class ExternalTab implements PrefsTab {
3029

30+
private final JabRefFrame frame;
3131
private final JabRefPreferences prefs;
3232
private final TextField emailSubject;
3333
private final TextField citeCommand;
@@ -54,6 +54,7 @@ class ExternalTab implements PrefsTab {
5454

5555
public ExternalTab(JabRefFrame frame, PreferencesDialog prefsDiag, JabRefPreferences prefs) {
5656
this.prefs = prefs;
57+
this.frame = frame;
5758
dialogService = frame.getDialogService();
5859
builder.setVgap(7);
5960

@@ -197,7 +198,7 @@ public Node getBuilder() {
197198
}
198199

199200
private void addSettingsButton(final PushToApplication application, GridPane panel, int index) {
200-
PushToApplicationSettings settings = PushToApplicationsManager.getSettings(application);
201+
PushToApplicationSettings settings = frame.getPushApplications().getSettings(application);
201202
Button button = new Button(Localization.lang("Settings for %0", application.getApplicationName()));
202203
button.setPrefSize(150, 20);
203204
button.setOnAction(e -> PushToApplicationSettingsDialog.showSettingsDialog(dialogService, settings, index));

src/main/java/org/jabref/gui/preferences/PreferencesDialog.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#sideMenu {
2-
-fx-background-color: -jr-white;
2+
-fx-background-color: -fx-control-inner-background;
33
-fx-border-color: -fx-outer-border;
44
-fx-border-width: 1;
55
}
66

77
#sideMenu > .virtual-flow > .clipped-container > .sheet > .list-cell {
88
-fx-padding: 8 8 8 8;
9-
-fx-background: -jr-white;
9+
-fx-background: -fx-control-inner-background;
1010
}
1111

1212
.preferencePaneContainer {

src/main/java/org/jabref/gui/push/PushToApplicationSettings.java

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public class PushToApplicationSettings {
1919
protected AbstractPushToApplication application;
2020
private DialogService dialogService;
2121

22+
public PushToApplicationSettings(DialogService dialogService) {
23+
this.dialogService = dialogService;
24+
}
25+
2226
public GridPane getJFXSettingPane(int n) {
2327
switch (n) {
2428
case 0:

src/main/java/org/jabref/gui/push/PushToApplicationsManager.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ public class PushToApplicationsManager {
1010

1111
private final List<PushToApplication> applications;
1212

13+
private final DialogService dialogService;
14+
1315
public PushToApplicationsManager(DialogService dialogService) {
16+
this.dialogService = dialogService;
1417
// Set up the current available choices:
1518
applications = new ArrayList<>();
1619
applications.add(new PushToEmacs(dialogService));
@@ -25,15 +28,15 @@ public List<PushToApplication> getApplications() {
2528
return applications;
2629
}
2730

28-
public static PushToApplicationSettings getSettings(PushToApplication application) {
31+
public PushToApplicationSettings getSettings(PushToApplication application) {
2932
if (application instanceof PushToEmacs) {
30-
return new PushToEmacsSettings();
33+
return new PushToEmacsSettings(dialogService);
3134
} else if (application instanceof PushToLyx) {
32-
return new PushToLyxSettings();
35+
return new PushToLyxSettings(dialogService);
3336
} else if (application instanceof PushToVim) {
34-
return new PushToVimSettings();
37+
return new PushToVimSettings(dialogService);
3538
} else {
36-
return new PushToApplicationSettings();
39+
return new PushToApplicationSettings(dialogService);
3740
}
3841
}
3942

src/main/java/org/jabref/gui/push/PushToEmacsSettings.java

+3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
import javafx.scene.control.TextField;
55

66
import org.jabref.Globals;
7+
import org.jabref.gui.DialogService;
78
import org.jabref.logic.l10n.Localization;
89
import org.jabref.preferences.JabRefPreferences;
910

1011
public class PushToEmacsSettings extends PushToApplicationSettings {
1112

1213
private final TextField additionalParams = new TextField();
1314

15+
public PushToEmacsSettings (DialogService dialogService) { super(dialogService); }
16+
1417
@Override
1518
public void storeSettings() {
1619
super.storeSettings();

src/main/java/org/jabref/gui/push/PushToLyxSettings.java

+3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package org.jabref.gui.push;
22

33
import org.jabref.Globals;
4+
import org.jabref.gui.DialogService;
45
import org.jabref.logic.l10n.Localization;
56
import org.jabref.preferences.JabRefPreferences;
67

78
public class PushToLyxSettings extends PushToApplicationSettings {
89

10+
public PushToLyxSettings (DialogService dialogService) { super(dialogService); }
11+
912
@Override
1013
protected void initJFXSettingsPanel() {
1114
super.initJFXSettingsPanel();

src/main/java/org/jabref/gui/push/PushToVimSettings.java

+3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
import javafx.scene.control.TextField;
55

66
import org.jabref.Globals;
7+
import org.jabref.gui.DialogService;
78
import org.jabref.logic.l10n.Localization;
89
import org.jabref.preferences.JabRefPreferences;
910

1011
public class PushToVimSettings extends PushToApplicationSettings {
1112

1213
private final TextField vimServer = new TextField();
1314

15+
public PushToVimSettings (DialogService dialogService) { super(dialogService); }
16+
1417
@Override
1518
public void storeSettings() {
1619
super.storeSettings();

0 commit comments

Comments
 (0)