diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5a3658fc08..9491e0bcf7c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,6 +141,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed line navigation and deletion shortcuts in multiline entry fields and the source editor. [#17256](https://github.com/JabRef/jabref/issues/17256) - We fixed an issue where the "Get fulltext" button showed no progress during "Search full text documents online". [#17224](https://github.com/JabRef/jabref/pull/17224) - We fixed an issue where searching with a full DOI link returned no results. [#17348](https://github.com/JabRef/jabref/issues/17348) +- We fixed an issue where the side panels were not reachable in small windows. [#17470](https://github.com/JabRef/jabref/issues/17470) - We fixed an issue where the consistency check reported missing linked files as an inconsistency. [#17309](https://github.com/JabRef/jabref/issues/17309) - We fixed an issue where disabling linked-file full-text indexing did not stop ongoing indexing. [#17577](https://github.com/JabRef/jabref/issues/17577) - We reduced the flickering of the entry editor when switching between entries with groups or keywords. [#17229](https://github.com/JabRef/jabref/issues/17229) diff --git a/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java b/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java index ef217f975d15..0ec2de5ee592 100644 --- a/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java +++ b/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java @@ -21,6 +21,7 @@ import javafx.geometry.Orientation; import javafx.scene.Node; import javafx.scene.control.ContextMenu; +import javafx.scene.control.ScrollPane; import javafx.scene.control.SeparatorMenuItem; import javafx.scene.control.SplitPane; import javafx.scene.control.Tab; @@ -134,6 +135,7 @@ private enum PanelMode { MAIN_TABLE, MAIN_TABLE_AND_ENTRY_EDITOR } private final GuiPushToApplicationCommand pushToApplicationCommand; private final SplitPane horizontalSplit = new SplitPane(); private final SidePane sidePane; + private final ScrollPane sidePaneScroll = new ScrollPane(); private final SplitPane verticalSplit = new SplitPane(); private final TabPane tabbedPane = new TabPane(); private final EntryEditor entryEditor; @@ -290,7 +292,14 @@ private void initLayout() { horizontalSplit.getItems().addAll(verticalSplit); horizontalSplit.setOrientation(Orientation.HORIZONTAL); - SplitPane.setResizableWithParent(sidePane, false); + sidePaneScroll.setContent(sidePane); + sidePaneScroll.setFitToWidth(true); + sidePaneScroll.setFitToHeight(true); + sidePaneScroll.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); + sidePaneScroll.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); + sidePaneScroll.getStyleClass().add("side-pane-scroll"); + + SplitPane.setResizableWithParent(sidePaneScroll, false); sidePane.widthProperty().addListener(_ -> updateSidePane()); sidePane.getChildren().addListener((InvalidationListener) _ -> updateSidePane()); updateSidePane(); @@ -300,11 +309,11 @@ private void initLayout() { private void updateSidePane() { if (sidePane.getChildren().isEmpty()) { unsubscribeHorizontalDivider(); - horizontalSplit.getItems().remove(sidePane); + horizontalSplit.getItems().remove(sidePaneScroll); } else { - if (!horizontalSplit.getItems().contains(sidePane)) { + if (!horizontalSplit.getItems().contains(sidePaneScroll)) { horizontalSplit.setVisible(false); - horizontalSplit.getItems().addFirst(sidePane); + horizontalSplit.getItems().addFirst(sidePaneScroll); Platform.runLater(() -> { updateHorizontalDividerPosition(); horizontalSplit.setVisible(true); diff --git a/jabgui/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java b/jabgui/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java index a90a9e43e842..3493ca927a59 100644 --- a/jabgui/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java +++ b/jabgui/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java @@ -7,6 +7,7 @@ import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; +import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import org.jabref.gui.actions.SimpleCommand; @@ -42,6 +43,12 @@ private void initialize() { setTop(createHeaderView()); setCenter(contentFactory.create(sidePaneType)); VBox.setVgrow(this, sidePaneType == SidePaneType.GROUPS ? Priority.ALWAYS : Priority.NEVER); + + if (sidePaneType == SidePaneType.GROUPS) { + setMinHeight(220); + } else { + setMinHeight(Region.USE_PREF_SIZE); + } } private Node createHeaderView() { diff --git a/jabgui/src/main/resources/org/jabref/gui/theme/internal/jabref-base.css b/jabgui/src/main/resources/org/jabref/gui/theme/internal/jabref-base.css index 0dcb07fb2dec..f1b77764ef07 100644 --- a/jabgui/src/main/resources/org/jabref/gui/theme/internal/jabref-base.css +++ b/jabgui/src/main/resources/org/jabref/gui/theme/internal/jabref-base.css @@ -1816,3 +1816,11 @@ We want to have a look that matches our icons in the tool-bar */ .flashing-danger { -fx-background-color: -color-danger; } + +.side-pane-scroll { + -fx-padding: 0; +} + +.side-pane-scroll > .scroll-bar:vertical { + -fx-padding: 0 4 0 4; +}