Skip to content

Commit

Permalink
Fixed library height bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitrisdimos00 committed Apr 7, 2022
1 parent 50a9ea8 commit 31764b1
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/main/java/org/jabref/gui/groups/GroupTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;

import org.jabref.gui.DialogService;
Expand Down Expand Up @@ -108,7 +109,18 @@ private void createNodes() {
HBox.setHgrow(searchField, Priority.ALWAYS);
HBox groupFilterBar = new HBox(searchField);
groupFilterBar.setId("groupFilterBar");
this.setTop(groupFilterBar);

addNewGroup = new Button(Localization.lang("Add group"));
addNewGroup.setId("addNewGroup");
addNewGroup.setMaxWidth(Double.MAX_VALUE);
HBox.setHgrow(addNewGroup, Priority.ALWAYS);
addNewGroup.setTooltip(new Tooltip(Localization.lang("New group")));
addNewGroup.setOnAction(event -> addNewGroup());
HBox groupBar = new HBox(addNewGroup);
groupBar.setId("groupBar");

VBox filterAndButton = new VBox(groupFilterBar, groupBar);
this.setTop(filterAndButton);

mainColumn = new TreeTableColumn<>();
mainColumn.setId("mainColumn");
Expand All @@ -126,18 +138,10 @@ private void createNodes() {
groupTree.setId("groupTree");
groupTree.setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
groupTree.getColumns().addAll(List.of(mainColumn, numberColumn, expansionNodeColumn));
this.setBottom(groupTree);
this.setCenter(groupTree);

addNewGroup = new Button(Localization.lang("Add group"));
addNewGroup.setId("addNewGroup");
addNewGroup.setMaxWidth(Double.MAX_VALUE);
HBox.setHgrow(addNewGroup, Priority.ALWAYS);
addNewGroup.setTooltip(new Tooltip(Localization.lang("New group")));
addNewGroup.setOnAction(event -> addNewGroup());

HBox groupBar = new HBox(addNewGroup);
groupBar.setId("groupBar");
this.setCenter(groupBar);
HBox placeholder = new HBox();
this.setBottom(placeholder);
}

private void initialize() {
Expand Down

0 comments on commit 31764b1

Please sign in to comment.