Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sharelatex
Browse files Browse the repository at this point in the history
* upstream/master:
  Convert crossref editor to tag-like interface using JavaFX (#2840)
  Fix #2847: Add scrollbars to entry editor
  Update Localization of Greek Translations (#2895)
  • Loading branch information
Siedlerchr committed Jun 10, 2017
2 parents 6fe01c4 + b5f1e7d commit 1af149f
Show file tree
Hide file tree
Showing 17 changed files with 745 additions and 947 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/entryeditor/EntryEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
-fx-hgap: 10;
-fx-vgap: 6;
-fx-background-color: text-area-background;
-fx-padding: 0 0 0 5;
-fx-padding: 5 0 0 5;
}
12 changes: 9 additions & 3 deletions src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
Expand Down Expand Up @@ -155,8 +156,6 @@ private Region setupPanel(JabRefFrame frame, BasePanel bPanel, boolean compresse
}

GridPane gridPane = new GridPane();
gridPane.setPrefSize(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
gridPane.setMaxSize(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
gridPane.getStyleClass().add("editorPane");

ColumnConstraints columnExpand = new ColumnConstraints();
Expand Down Expand Up @@ -204,7 +203,14 @@ private Region setupPanel(JabRefFrame frame, BasePanel bPanel, boolean compresse
}
gridPane.getStylesheets().add("org/jabref/gui/entryeditor/EntryEditor.css");

return gridPane;
// Warp everything in a scroll-pane
ScrollPane scrollPane = new ScrollPane();
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
scrollPane.setContent(gridPane);
scrollPane.setFitToWidth(true);
scrollPane.setFitToHeight(true);
return scrollPane;
}

private String getPrompt(String field) {
Expand Down
Loading

0 comments on commit 1af149f

Please sign in to comment.