Skip to content

Commit b936ba9

Browse files
matthiasgeigerLinusDietz
authored andcommitted
improve styling of preferences side menu (#4556)
1 parent 26cd572 commit b936ba9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/java/org/jabref/gui/preferences/PreferencesDialog.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#sideMenu {
22
-fx-background-color: -jr-white;
3+
-fx-border-color: -fx-outer-border;
4+
-fx-border-width: 1;
35
}
46

57
#sideMenu > .virtual-flow > .clipped-container > .sheet > .list-cell {

src/main/java/org/jabref/gui/preferences/PreferencesDialog.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,21 @@ private void construct() {
116116

117117
VBox buttonContainer = new VBox();
118118
buttonContainer.setAlignment(Pos.BOTTOM_LEFT);
119+
buttonContainer.setSpacing(3.0);
119120
Button importPreferences = new Button(Localization.lang("Import preferences"));
120121
importPreferences.setTooltip(new Tooltip(Localization.lang("Import preferences from file")));
121122
importPreferences.setOnAction(e -> importPreferences());
122-
importPreferences.getStyleClass().add("text-button");
123+
importPreferences.setMaxWidth(Double.MAX_VALUE);
123124
Button exportPreferences = new Button(Localization.lang("Export preferences"));
124125
exportPreferences.setTooltip(new Tooltip(Localization.lang("Export preferences to file")));
125126
exportPreferences.setOnAction(e -> exportPreferences());
126-
exportPreferences.getStyleClass().add("text-button");
127+
exportPreferences.setMaxWidth(Double.MAX_VALUE);
127128
Button showPreferences = new Button(Localization.lang("Show preferences"));
128129
showPreferences.setOnAction(e -> new PreferencesFilterDialog(new JabRefPreferencesFilter(prefs)).setVisible(true));
129-
showPreferences.getStyleClass().add("text-button");
130+
showPreferences.setMaxWidth(Double.MAX_VALUE);
130131
Button resetPreferences = new Button(Localization.lang("Reset preferences"));
131132
resetPreferences.setOnAction(e -> resetPreferences());
132-
resetPreferences.getStyleClass().add("text-button");
133+
resetPreferences.setMaxWidth(Double.MAX_VALUE);
133134
buttonContainer.getChildren().addAll(
134135
importPreferences,
135136
exportPreferences,
@@ -138,6 +139,7 @@ private void construct() {
138139
);
139140

140141
VBox spacer = new VBox();
142+
spacer.setPrefHeight(10.0);
141143
VBox.setVgrow(tabsList, Priority.ALWAYS);
142144
VBox.setVgrow(spacer, Priority.SOMETIMES);
143145
vBox.getChildren().addAll(

0 commit comments

Comments
 (0)