Commit bb85f247 authored by legoc's avatar legoc
Browse files

Removed setPrefWidth calls to some buttons

parent 27d95dfc
......@@ -179,6 +179,9 @@ public class Nomad3DEditor extends Application {
} else {
scene = loadScene(initialModelPath);
}
// ClassLoader classLoader = getClass().getClassLoader();
// scene.getStylesheets().add(classLoader.getResource("Style.css").toExternalForm());
this.stage = stage;
stage.setTitle(TITLE);
......@@ -345,6 +348,9 @@ public class Nomad3DEditor extends Application {
this.scene = new Scene(pane);
scene.setFill(Color.WHITE);
// ClassLoader classLoader = getClass().getClassLoader();
// scene.getStylesheets().add(classLoader.getResource("Style.css").toExternalForm());
buildEventHandlers(axesGroup);
// Initialize the camera position
......
......@@ -225,7 +225,12 @@ public class EditorMenuBar extends MenuBar {
GridPane scenePane = new GridPane();
scenePane.setAlignment(Pos.CENTER);
Scene addScene = new Scene(scenePane);
// ClassLoader classLoader = getClass().getClassLoader();
// addScene.getStylesheets().add(classLoader.getResource("Style.css").toExternalForm());
Stage addStage = new Stage(StageStyle.UTILITY);
addStage.setTitle(addAxisItem.getText());
addStage.setScene(addScene);
......@@ -239,7 +244,6 @@ public class EditorMenuBar extends MenuBar {
GridPane.setMargin(addPane, new Insets(10));
Label typeLabel = new Label("Type : ");
typeLabel.setPrefWidth(50);
ObservableList<Axis.Type> types = FXCollections.observableArrayList(Axis.Type.FIXED, Axis.Type.TRANSLATION, Axis.Type.ROTATION, Axis.Type.NONE);
ComboBox<Axis.Type> typeBox = new ComboBox<>(types);
typeBox.getSelectionModel().select(selectedAxis.getType());
......@@ -387,7 +391,6 @@ public class EditorMenuBar extends MenuBar {
GridPane typePane = new GridPane();
typePane.setHgap(10);
typePane.setVgap(5);
typePane.setPrefWidth(650);
typePane.setAlignment(Pos.CENTER);
typePane.addRow(0, typeLabel, typeBox);
typePane.addRow(1, dirLabel, xDirLabel, xDirField, yDirLabel, yDirField, zDirLabel, zDirField);
......@@ -490,17 +493,14 @@ public class EditorMenuBar extends MenuBar {
GridPane.setMargin(calibratePane, new Insets(5));
Button minButton = new Button("Set min");
minButton.setPrefWidth(125);
minButton.setOnAction(minEvent -> {
selectedAxis.setMinValue(selectedAxis.getValue());
});
Button medianButton = new Button("Set zero");
medianButton.setPrefWidth(125);
medianButton.setOnAction(medianEvent -> {
selectedAxis.setZeroValue(selectedAxis.getValue());
});
Button maxButton = new Button("Set max");
maxButton.setPrefWidth(125);
maxButton.setOnAction(maxEvent -> {
selectedAxis.setMaxValue(selectedAxis.getValue());
});
......@@ -514,7 +514,6 @@ public class EditorMenuBar extends MenuBar {
GridPane.setMargin(buttonsPane, new Insets(10));
Button resetButton = new Button("Reset");
resetButton.setPrefWidth(100);
final double minInit = selectedAxis.getMinValue();
final double zeroInit = selectedAxis.getZeroValue();
final double maxInit = selectedAxis.getMaxValue();
......@@ -526,7 +525,6 @@ public class EditorMenuBar extends MenuBar {
selectedAxis.move(valueInit - selectedAxis.getValue());
});
Button rmLimitsButton = new Button("Remove limits");
rmLimitsButton.setPrefWidth(resetButton.getPrefWidth());
rmLimitsButton.setOnAction(rmEvent -> {
selectedAxis.setMinValue(Double.NEGATIVE_INFINITY);
selectedAxis.setMaxValue(Double.POSITIVE_INFINITY);
......@@ -688,7 +686,6 @@ public class EditorMenuBar extends MenuBar {
GridPane.setColumnSpan(controllersList, GridPane.REMAINING);
Button selectButton = new Button("Select");
selectButton.setPrefWidth(sceneWidth / 2);
selectButton.setDefaultButton(true);
selectButton.setOnAction(selEvent -> {
Nomad3DController selectedController = controllersList.getSelectionModel().getSelectedItem();
......@@ -719,7 +716,6 @@ public class EditorMenuBar extends MenuBar {
}
});
Button cancelButton = new Button("Cancel");
cancelButton.setPrefWidth(sceneWidth / 2);
cancelButton.setCancelButton(true);
cancelButton.setOnAction(cancelEvent -> {
linkStage.close();
......
.label {
-fx-font-size: 8px;
-fx-font-weight: bold;
-fx-text-fill: #333333;
-fx-effect: dropshadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 );
}
.button {
-fx-font-size: 8px;
-fx-font-weight: bold;
-fx-text-fill: #333333;
-fx-effect: dropshadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 );
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment