Skip to content

Commit

Permalink
ux: move group filter bar to top
Browse files Browse the repository at this point in the history
Switch search field and new group button
Cleanups
  • Loading branch information
stefan-kolb committed Mar 13, 2020
1 parent 23034ce commit 998ddc0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
9 changes: 7 additions & 2 deletions src/main/java/org/jabref/gui/groups/GroupTree.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,18 @@
-fx-translate-x: -0.4em;
}

#barBottom {
#newGroupButton {
-jfx-button-type: RAISED;
-fx-padding: 0em 1em 0em 1em;
}

#groupFilterBar {
-fx-background-color: -jr-sidepane-header-background;
-fx-border-color: -jr-separator;
-fx-border-width: 1 0 0 0;
-fx-padding: 0em 1em 0em 1em;
}

#barBottom .glyph-icon {
#groupFilterBar .glyph-icon {
-fx-font-size: 2em;
}
32 changes: 13 additions & 19 deletions src/main/java/org/jabref/gui/groups/GroupTree.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
<?import org.controlsfx.control.textfield.CustomTextField?>
<BorderPane xmlns:fx="http://javafx.com/fxml/1" prefHeight="600.0" prefWidth="150.0"
xmlns="http://javafx.com/javafx/8.0.112" fx:controller="org.jabref.gui.groups.GroupTreeView">
<top>
<HBox fx:id="groupFilterBar" alignment="CENTER">
<CustomTextField fx:id="searchField" promptText="%Filter groups" HBox.hgrow="ALWAYS"/>
<Button fx:id="newGroupButton" onAction="#addNewGroup" styleClass="icon-button" ButtonBar.buttonData="RIGHT">
<graphic>
<JabRefIconView glyph="NEW_GROUP" glyphSize="18"/>
</graphic>
<tooltip>
<Tooltip text="%New group"/>
</tooltip>
</Button>
</HBox>
</top>
<center>
<TreeTableView fx:id="groupTree" layoutY="-7.0" prefHeight="600.0" prefWidth="250.0">
<columns>
Expand All @@ -26,23 +39,4 @@
</columnResizePolicy>
</TreeTableView>
</center>
<bottom>
<HBox fx:id="barBottom" alignment="CENTER">
<ButtonBar fx:id="buttonBarBottom">
<buttons>
<Button fx:id="newGroupButton" onAction="#addNewGroup" styleClass="icon-button"
ButtonBar.buttonData="LEFT">
<graphic>
<JabRefIconView glyph="NEW_GROUP" glyphSize="18"/>
</graphic>
<tooltip>
<Tooltip text="%New group"/>
</tooltip>
</Button>
</buttons>
</ButtonBar>
<Region prefWidth="20.0" HBox.hgrow="ALWAYS"/>
<CustomTextField fx:id="searchField" promptText="%Filter groups"/>
</HBox>
</bottom>
</BorderPane>

0 comments on commit 998ddc0

Please sign in to comment.