From 797a579cdfb6eb36772742469a6d630e3f83d1d6 Mon Sep 17 00:00:00 2001 From: Matthias Geiger Date: Fri, 28 Dec 2018 16:31:13 +0100 Subject: [PATCH] improve styling of preferences side menu (#4556) --- .../org/jabref/gui/preferences/PreferencesDialog.css | 2 ++ .../org/jabref/gui/preferences/PreferencesDialog.java | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/preferences/PreferencesDialog.css b/src/main/java/org/jabref/gui/preferences/PreferencesDialog.css index 21717a7709c..2b2d8c34859 100644 --- a/src/main/java/org/jabref/gui/preferences/PreferencesDialog.css +++ b/src/main/java/org/jabref/gui/preferences/PreferencesDialog.css @@ -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 { diff --git a/src/main/java/org/jabref/gui/preferences/PreferencesDialog.java b/src/main/java/org/jabref/gui/preferences/PreferencesDialog.java index 53a8d561a11..72da827e2e2 100644 --- a/src/main/java/org/jabref/gui/preferences/PreferencesDialog.java +++ b/src/main/java/org/jabref/gui/preferences/PreferencesDialog.java @@ -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, @@ -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(