Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ux: move group filter bar to top #6112

Merged
merged 2 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Increase size of expand groups icon
  • Loading branch information
stefan-kolb committed Mar 13, 2020
commit 45200d39ad24b766a4a6fb9905d011bb2188b377
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/groups/GroupTree.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
-fx-fill: -jr-group-hits-fg;
}

.disclosureNodeColumn {
.expansionNodeColumn {
-fx-alignment: top-right;
}

Expand Down Expand Up @@ -73,7 +73,7 @@
-fx-padding: 0.40em 0.2em 0.40em 0em;
}

.tree-table-row-cell:root > .disclosureNodeColumn {
.tree-table-row-cell:root > .expansionNodeColumn {
-fx-padding: 0.45em 0.2em 0.45em 0.2em;
}

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/jabref/gui/groups/GroupTree.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<top>
<HBox fx:id="groupFilterBar" alignment="CENTER" spacing="8">
<CustomTextField fx:id="searchField" promptText="%Filter groups" HBox.hgrow="ALWAYS"/>
<Button fx:id="newGroupButton" onAction="#addNewGroup" styleClass="icon-button" ButtonBar.buttonData="RIGHT">
<Button fx:id="newGroupButton" onAction="#addNewGroup" styleClass="icon-button"
ButtonBar.buttonData="RIGHT">
<graphic>
<JabRefIconView glyph="NEW_GROUP" glyphSize="18"/>
</graphic>
Expand All @@ -30,8 +31,8 @@
<TreeTableColumn fx:id="mainColumn"/>
<TreeTableColumn fx:id="numberColumn" minWidth="50.0" maxWidth="70.0" prefWidth="60.0"
styleClass="numberColumn"/>
<TreeTableColumn fx:id="disclosureNodeColumn" maxWidth="14.0" minWidth="14.0"
styleClass="disclosureNodeColumn" text="Column X"/>
<TreeTableColumn fx:id="expansionNodeColumn" maxWidth="25.0" minWidth="25.0"
styleClass="expansionNodeColumn"/>
</columns>
<columnResizePolicy>
<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/groups/GroupTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class GroupTreeView {
@FXML private TreeTableView<GroupNodeViewModel> groupTree;
@FXML private TreeTableColumn<GroupNodeViewModel, GroupNodeViewModel> mainColumn;
@FXML private TreeTableColumn<GroupNodeViewModel, GroupNodeViewModel> numberColumn;
@FXML private TreeTableColumn<GroupNodeViewModel, GroupNodeViewModel> disclosureNodeColumn;
@FXML private TreeTableColumn<GroupNodeViewModel, GroupNodeViewModel> expansionNodeColumn;
@FXML private CustomTextField searchField;

@Inject private StateManager stateManager;
Expand Down Expand Up @@ -158,7 +158,7 @@ public void initialize() {
group.toggleExpansion();
event.consume();
})
.install(disclosureNodeColumn);
.install(expansionNodeColumn);

// Set pseudo-classes to indicate if row is root or sub-item ( > 1 deep)
PseudoClass rootPseudoClass = PseudoClass.getPseudoClass("root");
Expand Down