Skip to content

Commit

Permalink
improve styling of preferences side menu (JabRef#4556)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgeiger authored and LinusDietz committed Dec 28, 2018
1 parent 368b49a commit 797a579
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#sideMenu {
-fx-background-color: -jr-white;
-fx-border-color: -fx-outer-border;
-fx-border-width: 1;
}

#sideMenu > .virtual-flow > .clipped-container > .sheet > .list-cell {
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/jabref/gui/preferences/PreferencesDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,21 @@ private void construct() {

VBox buttonContainer = new VBox();
buttonContainer.setAlignment(Pos.BOTTOM_LEFT);
buttonContainer.setSpacing(3.0);
Button importPreferences = new Button(Localization.lang("Import preferences"));
importPreferences.setTooltip(new Tooltip(Localization.lang("Import preferences from file")));
importPreferences.setOnAction(e -> importPreferences());
importPreferences.getStyleClass().add("text-button");
importPreferences.setMaxWidth(Double.MAX_VALUE);
Button exportPreferences = new Button(Localization.lang("Export preferences"));
exportPreferences.setTooltip(new Tooltip(Localization.lang("Export preferences to file")));
exportPreferences.setOnAction(e -> exportPreferences());
exportPreferences.getStyleClass().add("text-button");
exportPreferences.setMaxWidth(Double.MAX_VALUE);
Button showPreferences = new Button(Localization.lang("Show preferences"));
showPreferences.setOnAction(e -> new PreferencesFilterDialog(new JabRefPreferencesFilter(prefs)).setVisible(true));
showPreferences.getStyleClass().add("text-button");
showPreferences.setMaxWidth(Double.MAX_VALUE);
Button resetPreferences = new Button(Localization.lang("Reset preferences"));
resetPreferences.setOnAction(e -> resetPreferences());
resetPreferences.getStyleClass().add("text-button");
resetPreferences.setMaxWidth(Double.MAX_VALUE);
buttonContainer.getChildren().addAll(
importPreferences,
exportPreferences,
Expand All @@ -138,6 +139,7 @@ private void construct() {
);

VBox spacer = new VBox();
spacer.setPrefHeight(10.0);
VBox.setVgrow(tabsList, Priority.ALWAYS);
VBox.setVgrow(spacer, Priority.SOMETIMES);
vBox.getChildren().addAll(
Expand Down

0 comments on commit 797a579

Please sign in to comment.