Skip to content

Commit 4b83b88

Browse files
authored
Make citations expanding (#14206)
1 parent 0883921 commit 4b83b88

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,11 @@ private SplitPane getPaneAndStartSearch(BibEntry entry) {
369369
// Create ListViews
370370
CheckListView<CitationRelationItem> citingListView = new CheckListView<>();
371371
CheckListView<CitationRelationItem> citedByListView = new CheckListView<>();
372+
// Allow the list views to expand/shrink with the window size
373+
citingListView.setMaxHeight(Double.MAX_VALUE);
374+
citingListView.setMinHeight(0);
375+
citedByListView.setMaxHeight(Double.MAX_VALUE);
376+
citedByListView.setMinHeight(0);
372377

373378
// Create refresh Buttons for both sides
374379
Button refreshCitingButton = IconTheme.JabRefIcons.REFRESH.asButton();
@@ -622,8 +627,17 @@ public boolean shouldShow(BibEntry entry) {
622627
@Override
623628
protected void bindToEntry(BibEntry entry) {
624629
citationsRelationsTabViewModel.bindToEntry(entry);
625-
VBox entirePanel = new VBox(getPaneAndStartSearch(entry), sciteResultsPane);
626-
setContent(entirePanel);
630+
631+
SplitPane splitPane = getPaneAndStartSearch(entry);
632+
splitPane.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
633+
splitPane.setMinSize(0, 0);
634+
635+
BorderPane root = new BorderPane();
636+
root.setCenter(splitPane);
637+
root.setBottom(sciteResultsPane);
638+
root.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
639+
640+
setContent(root);
627641
}
628642

629643
private void searchForRelations(CitationComponents citationComponents,

0 commit comments

Comments
 (0)