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

Improve toolbar icons and their layout #4730

Merged
merged 5 commits into from
Mar 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We added the ability to execute default action in dialog by using with <kbd>Ctrl</kbd> + <kbd>Enter</kbd> combination [#4496](https://github.com/JabRef/jabref/issues/4496)
- We grouped and reordered the Main Menu (File, Edit, Library, Quality, Tools, and View tabs & icons). [#4666](https://github.com/JabRef/jabref/issues/4666) [#4667](https://github.com/JabRef/jabref/issues/4667) [#4668](https://github.com/JabRef/jabref/issues/4668) [#4669](https://github.com/JabRef/jabref/issues/4669) [#4670](https://github.com/JabRef/jabref/issues/4670) [#4671](https://github.com/JabRef/jabref/issues/4671) [#4672](https://github.com/JabRef/jabref/issues/4672) [#4673](https://github.com/JabRef/jabref/issues/4673)
- We added additional modifiers (capitalize, titlecase and sentencecase) to the Bibtex key generator. [#1506](https://github.com/JabRef/jabref/issues/1506)

- We grouped the toolbar icons and changed the Open Library and Copy icons. [#4584](https://github.com/JabRef/jabref/issues/4584)


### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@
.separator:vertical .line {
-fx-border-color: -jr-separator;
-fx-border-width: 1;
-fx-border-insets: 0 0 0 1;
-fx-border-insets: 5 15 5 15;
}

.mainToolbar {
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.geometry.Orientation;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
Expand All @@ -33,6 +34,7 @@
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.Separator;
import javafx.scene.control.SeparatorMenuItem;
import javafx.scene.control.SplitPane;
import javafx.scene.control.Tab;
Expand Down Expand Up @@ -617,21 +619,21 @@ private Node createToolbar() {
leftSide.setMinWidth(100);
leftSide.prefWidthProperty().bind(sidePane.widthProperty());
leftSide.maxWidthProperty().bind(sidePane.widthProperty());

PushToApplicationButton pushToExternal = new PushToApplicationButton(this, pushApplications.getApplications());
HBox rightSide = new HBox(
factory.createIconButton(StandardActions.NEW_ARTICLE, new NewEntryAction(this, BiblatexEntryTypes.ARTICLE, dialogService, Globals.prefs)),
factory.createIconButton(StandardActions.DELETE_ENTRY, new OldDatabaseCommandWrapper(Actions.DELETE, this, Globals.stateManager)),

new Separator(Orientation.VERTICAL),
factory.createIconButton(StandardActions.UNDO, new OldDatabaseCommandWrapper(Actions.UNDO, this, Globals.stateManager)),
factory.createIconButton(StandardActions.REDO, new OldDatabaseCommandWrapper(Actions.REDO, this, Globals.stateManager)),
factory.createIconButton(StandardActions.CUT, new OldDatabaseCommandWrapper(Actions.CUT, this, Globals.stateManager)),
factory.createIconButton(StandardActions.COPY, new OldDatabaseCommandWrapper(Actions.COPY, this, Globals.stateManager)),
factory.createIconButton(StandardActions.PASTE, new OldDatabaseCommandWrapper(Actions.PASTE, this, Globals.stateManager)),

factory.createIconButton(StandardActions.CLEANUP_ENTRIES, new OldDatabaseCommandWrapper(Actions.CLEANUP, this, Globals.stateManager)),
new Separator(Orientation.VERTICAL),
factory.createIconButton(pushToExternal.getMenuAction(), pushToExternal),

factory.createIconButton(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, Globals.stateManager)),
factory.createIconButton(StandardActions.CLEANUP_ENTRIES, new OldDatabaseCommandWrapper(Actions.CLEANUP, this, Globals.stateManager)),
new Separator(Orientation.VERTICAL),
factory.createIconButton(StandardActions.FORK_ME, new OpenBrowserAction("https://github.com/JabRef/jabref")),
factory.createIconButton(StandardActions.OPEN_FACEBOOK, new OpenBrowserAction("https://www.facebook.com/JabRef/")),
factory.createIconButton(StandardActions.OPEN_TWITTER, new OpenBrowserAction("https://twitter.com/jabref_org"))
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/actions/StandardActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public enum StandardActions implements Action {
RELEVANCE(Localization.lang("Relevance"), IconTheme.JabRefIcons.RELEVANCE),
RELEVANT(Localization.lang("Toggle relevance"), IconTheme.JabRefIcons.RELEVANCE),
NEW_LIBRARY(Localization.lang("New library"), IconTheme.JabRefIcons.NEW),
NEW_LIBRARY_BIBTEX(Localization.lang("New %0 library", BibDatabaseMode.BIBTEX.getFormattedName())),
NEW_LIBRARY_BIBLATEX(Localization.lang("New %0 library", BibDatabaseMode.BIBLATEX.getFormattedName())),
NEW_LIBRARY_BIBTEX(Localization.lang("New %0 library", BibDatabaseMode.BIBTEX.getFormattedName()), IconTheme.JabRefIcons.NEW),
NEW_LIBRARY_BIBLATEX(Localization.lang("New %0 library", BibDatabaseMode.BIBLATEX.getFormattedName()), IconTheme.JabRefIcons.NEW),
OPEN_LIBRARY(Localization.lang("Open library"), IconTheme.JabRefIcons.OPEN, KeyBinding.OPEN_DATABASE),
IMPORT(Localization.lang("Import"), IconTheme.JabRefIcons.IMPORT),
EXPORT(Localization.lang("Export"), IconTheme.JabRefIcons.EXPORT),
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/icon/IconTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public enum JabRefIcons implements JabRefIcon {
CLOSE(MaterialDesignIcon.CLOSE_CIRCLE),
PASTE(JabRefMaterialDesignIcon.PASTE),
CUT(MaterialDesignIcon.CONTENT_CUT),
COPY(JabRefMaterialDesignIcon.COPY),
COPY(MaterialDesignIcon.CONTENT_COPY),
COMMENT(MaterialDesignIcon.COMMENT),
REDO(MaterialDesignIcon.REDO),
UNDO(MaterialDesignIcon.UNDO),
Expand Down Expand Up @@ -239,7 +239,7 @@ public enum JabRefIcons implements JabRefIcon {
AUTO_FILE_LINK(MaterialDesignIcon.FILE_FIND) /*css: file-find */,
QUALITY_ASSURED(MaterialDesignIcon.CERTIFICATE), /*css: certificate */
QUALITY(MaterialDesignIcon.CERTIFICATE),/*css: certificate */
OPEN(MaterialDesignIcon.FOLDER_OUTLINE) /*css: folder-outline */,
OPEN(MaterialDesignIcon.FOLDER_OUTLINE) /*css: folder */,
ADD_ROW(MaterialDesignIcon.SERVER_PLUS) /* css: server-plus*/,
REMOVE_ROW(MaterialDesignIcon.SERVER_MINUS) /*css: server-minus */,
PICTURE(MaterialDesignIcon.FILE_IMAGE) /*css: file-image */,
Expand Down