Skip to content

Commit 1835b84

Browse files
authored
fix: Inconsistencies in the add button (#13786)
* fix: Inconsistencies in the add button * docs: Update CHANGELOG.md * docs: Update CHANGELOG.md * fix: A typo
1 parent 4c341d3 commit 1835b84

File tree

10 files changed

+62
-57
lines changed

10 files changed

+62
-57
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
120120
- We fixed an issue where "Copy to" was enabled even if no other library was opened. [#13280](https://github.com/JabRef/jabref/pull/13280)
121121
- We fixed an issue where the groups were still displayed after closing all libraries. [#13382](https://github.com/JabRef/jabref/issues/13382)
122122
- Enhanced field selection logic in the Merge Entries dialog when fetching from DOI to prefer valid years and entry types. [#12549](https://github.com/JabRef/jabref/issues/12549)
123+
- We improved consistency in the Add Buttons. [#13791](https://github.com/JabRef/jabref/pull/13791)
123124
- We fixed an issue where theme or font size are not respected for all dialogs [#13558](https://github.com/JabRef/jabref/issues/13558)
124125
- We removed unnecessary spacing and margin in the AutomaticFieldEditor. [#13792](https://github.com/JabRef/jabref/pull/13792)
125126

jabgui/src/main/java/org/jabref/gui/commonfxcontrols/SaveOrderConfigPanel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import jakarta.inject.Inject;
3333

3434
public class SaveOrderConfigPanel extends VBox {
35-
3635
@FXML private RadioButton exportInSpecifiedOrder;
3736
@FXML private RadioButton exportInTableOrder;
3837
@FXML private RadioButton exportInOriginalOrder;

jabgui/src/main/resources/org/jabref/gui/Base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,6 +2710,10 @@ journalInfo .grid-cell-b {
27102710
-fx-border-color: transparent;
27112711
}
27122712

2713+
.add-certificate {
2714+
-fx-pref-width: 17em;
2715+
-fx-min-width: 17em;
2716+
}
27132717

27142718
/* Quick Settings */
27152719
.quick-settings-container,

jabgui/src/main/resources/org/jabref/gui/commonfxcontrols/FieldFormatterCleanupsPanel.fxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<?import javafx.scene.layout.VBox?>
1212
<?import org.jabref.gui.icon.JabRefIconView?>
1313
<fx:root spacing="10.0" type="VBox"
14-
xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1"
15-
fx:controller="org.jabref.gui.commonfxcontrols.FieldFormatterCleanupsPanel">
14+
xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1"
15+
fx:controller="org.jabref.gui.commonfxcontrols.FieldFormatterCleanupsPanel">
1616
<CheckBox fx:id="cleanupsEnabled" text="%Enable field formatters"/>
1717
<HBox spacing="4.0">
1818
<VBox spacing="4.0" HBox.hgrow="ALWAYS">

jabgui/src/main/resources/org/jabref/gui/commonfxcontrols/SaveOrderConfigPanel.fxml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<?import javafx.scene.layout.ColumnConstraints?>
99
<?import javafx.scene.layout.GridPane?>
1010
<?import javafx.scene.layout.VBox?>
11+
<?import javafx.scene.layout.HBox?>
1112
<?import org.jabref.gui.icon.JabRefIconView?>
1213
<fx:root prefWidth="650.0" spacing="10.0" type="VBox"
1314
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1"
@@ -23,7 +24,7 @@
2324
<RadioButton fx:id="exportInSpecifiedOrder"
2425
text="%Use specified order" toggleGroup="$saveOrderToggleGroup"/>
2526

26-
<GridPane fx:id="sortCriterionList" hgap="10.0" vgap="4.0" maxWidth="450.0"
27+
<GridPane fx:id="sortCriterionList" hgap="10.0" vgap="4.0"
2728
disable="${!exportInSpecifiedOrder.selected}">
2829
<columnConstraints>
2930
<ColumnConstraints hgrow="NEVER" minWidth="40.0" maxWidth="40.0"/>
@@ -35,13 +36,14 @@
3536
<Insets left="30.0"/>
3637
</padding>
3738
</GridPane>
38-
<Button fx:id="addButton" onAction="#addCriterion" styleClass="icon-button" disable="${!exportInSpecifiedOrder.selected}"
39-
maxWidth="450.0" prefWidth="450.0">
40-
<graphic>
41-
<JabRefIconView glyph="ADD_NOBOX"/>
42-
</graphic>
43-
<tooltip>
44-
<Tooltip text="Add"/>
45-
</tooltip>
46-
</Button>
39+
<HBox alignment="BASELINE_RIGHT" disable="${!exportInSpecifiedOrder.selected}">
40+
<Button fx:id="addButton" onAction="#addCriterion" text="%Add">
41+
<graphic>
42+
<JabRefIconView glyph="ADD_NOBOX"/>
43+
</graphic>
44+
<tooltip>
45+
<Tooltip text="Add"/>
46+
</tooltip>
47+
</Button>
48+
</HBox>
4749
</fx:root>

jabgui/src/main/resources/org/jabref/gui/libraryproperties/constants/ConstantsProperties.fxml

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,36 @@
1111
<fx:root spacing="10.0" type="VBox"
1212
xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
1313
fx:controller="org.jabref.gui.libraryproperties.constants.ConstantsPropertiesView">
14-
<Label styleClass="sectionHeader" text="%String constants"/>
15-
<HBox spacing="4.0" VBox.vgrow="ALWAYS">
16-
<VBox spacing="4.0" HBox.hgrow="ALWAYS">
17-
<TableView fx:id="stringsList" VBox.vgrow="ALWAYS">
18-
<columns>
19-
<TableColumn fx:id="labelColumn" minWidth="75.0" text="%Label"/>
20-
<TableColumn fx:id="contentColumn" minWidth="75.0" text="%Content"/>
21-
<TableColumn fx:id="actionsColumn" maxWidth="30.0" minWidth="30.0" prefWidth="30.0"
22-
editable="false" resizable="false" reorderable="false"/>
23-
</columns>
24-
<columnResizePolicy>
25-
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
26-
</columnResizePolicy>
27-
</TableView>
28-
</VBox>
29-
<VBox>
30-
<Button styleClass="icon-button,narrow" onAction="#openHelp">
31-
<graphic>
32-
<JabRefIconView glyph="HELP"/>
33-
</graphic>
34-
<tooltip>
35-
<Tooltip text="%Open Help page"/>
36-
</tooltip>
37-
</Button>
38-
<VBox VBox.vgrow="ALWAYS"/>
39-
<Button styleClass="icon-button,narrow" fx:id="addStringButton" minWidth="-Infinity"
40-
onAction="#addString">
41-
<graphic>
42-
<JabRefIconView glyph="ADD_NOBOX"/>
43-
</graphic>
44-
<tooltip>
45-
<Tooltip text="%Add new String"/>
46-
</tooltip>
47-
</Button>
48-
</VBox>
14+
<HBox alignment="BOTTOM_LEFT" spacing="8.0">
15+
<Label styleClass="sectionHeader" text="%String constants"/>
16+
<Button onAction="#openHelp" styleClass="icon-button,narrow">
17+
<graphic>
18+
<JabRefIconView glyph="HELP"/>
19+
</graphic>
20+
<tooltip>
21+
<Tooltip text="%Open Help page"/>
22+
</tooltip>
23+
</Button>
24+
</HBox>
25+
<TableView fx:id="stringsList" VBox.vgrow="ALWAYS">
26+
<columns>
27+
<TableColumn fx:id="labelColumn" minWidth="75.0" text="%Label"/>
28+
<TableColumn fx:id="contentColumn" minWidth="75.0" text="%Content"/>
29+
<TableColumn fx:id="actionsColumn" maxWidth="30.0" minWidth="30.0" prefWidth="30.0"
30+
editable="false" resizable="false" reorderable="false"/>
31+
</columns>
32+
<columnResizePolicy>
33+
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
34+
</columnResizePolicy>
35+
</TableView>
36+
<HBox alignment="BASELINE_RIGHT" spacing="4.0">
37+
<Button fx:id="addStringButton" text="%Add" onAction="#addString">
38+
<graphic>
39+
<JabRefIconView glyph="ADD_NOBOX"/>
40+
</graphic>
41+
<tooltip>
42+
<Tooltip text="%Add new String"/>
43+
</tooltip>
44+
</Button>
4945
</HBox>
5046
</fx:root>

jabgui/src/main/resources/org/jabref/gui/libraryproperties/keypattern/KeyPatternProperties.fxml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
<?import javafx.scene.control.Label?>
55
<?import javafx.scene.layout.AnchorPane?>
66
<?import javafx.scene.layout.HBox?>
7-
<?import javafx.scene.layout.Region?>
87
<?import javafx.scene.layout.VBox?>
98
<?import org.jabref.gui.commonfxcontrols.CitationKeyPatternsPanel?>
109
<fx:root spacing="10.0" type="VBox"
1110
xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
1211
fx:controller="org.jabref.gui.libraryproperties.keypattern.KeyPatternPropertiesView">
13-
<HBox>
12+
<HBox alignment="BOTTOM_LEFT" spacing="8.0">
1413
<Label styleClass="sectionHeader" text="%Key patterns"/>
15-
<Region HBox.hgrow="ALWAYS"/>
16-
<Button fx:id="keyPatternHelp" prefWidth="20.0"/>
14+
<Button fx:id="keyPatternHelp" styleClass="icon-button,narrow" />
1715
</HBox>
1816
<Label text="%( Note: Press return to commit changes in the table! )"/>
1917
<AnchorPane VBox.vgrow="ALWAYS">

jabgui/src/main/resources/org/jabref/gui/libraryproperties/saving/SavingProperties.fxml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3+
<?import javafx.geometry.Insets?>
34
<?import javafx.scene.control.CheckBox?>
45
<?import javafx.scene.control.Label?>
56
<?import javafx.scene.layout.VBox?>
@@ -13,8 +14,11 @@
1314
text="%Refuse to save the library before external changes have been reviewed."/>
1415

1516
<Label styleClass="sectionHeader" text="%Save sort order"/>
16-
<SaveOrderConfigPanel fx:id="saveOrderConfigPanel"/>
17+
<SaveOrderConfigPanel fx:id="saveOrderConfigPanel" />
1718

1819
<Label styleClass="sectionHeader" text="%Save actions"/>
19-
<FieldFormatterCleanupsPanel fx:id="fieldFormatterCleanupsPanel"/>
20+
<FieldFormatterCleanupsPanel fx:id="fieldFormatterCleanupsPanel" />
21+
<padding>
22+
<Insets bottom="12.0" />
23+
</padding>
2024
</fx:root>

jabgui/src/main/resources/org/jabref/gui/preferences/network/NetworkTab.fxml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@
137137
<Button fx:id="addCertificate"
138138
mnemonicParsing="false"
139139
onAction="#addCertificateFile"
140-
text="%Add certificate"
140+
styleClass="add-certificate"
141+
text="%Browse for certificate..."
141142
GridPane.columnIndex="2"
142143
GridPane.halignment="RIGHT"
143144
GridPane.rowIndex="1"
@@ -146,7 +147,7 @@
146147
<Insets right="16.0"/>
147148
</GridPane.margin>
148149
<graphic>
149-
<JabRefIconView glyph="OPEN_LIST"/>
150+
<JabRefIconView glyph="ADD_NOBOX"/>
150151
</graphic>
151152
</Button>
152153
</GridPane>

jablib/src/main/resources/l10n/JabRef_en.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2580,7 +2580,7 @@ Symmetric\ word\ by\ word=Symmetric word by word
25802580
Verbatim=Verbatim
25812581
Word\ by\ word=Word by word
25822582
2583-
Add\ certificate=Add certificate
2583+
Browse\ for\ certificate...=Browse for certificate...
25842584
Serial\ number=Serial number
25852585
Issuer=Issuer
25862586
Valid\ from=Valid from

0 commit comments

Comments
 (0)