Skip to content
Snippets Groups Projects
Commit 7a5ba3dd authored by Edvard Berdal Eek's avatar Edvard Berdal Eek
Browse files

Change order of buttons in sidebar and set min and max height for sidebar components

parent d9fbe4fd
No related branches found
No related tags found
1 merge request!21Fix major bug when creating affine fractal with certain matrices.
Pipeline #288898 passed
......@@ -18,6 +18,8 @@ public class ColorPickerComponent extends ColorPicker {
this.getStyleClass().add("color-picker");
this.setMaxWidth(180);
this.setMinWidth(180);
this.setMinHeight(40);
this.setMaxHeight(40);
this.setOnAction(event -> colorChangeHandler.accept(this.getValue()));
}
}
......@@ -17,7 +17,10 @@ public class FractalSelectionBox extends ComboBox<String> {
* @param chaosGameController the controller for the chaos game
*/
public FractalSelectionBox(ChaosGameController chaosGameController) {
this.setPrefWidth(180);
this.setMaxWidth(180);
this.setMinWidth(180);
this.setMinHeight(40);
this.setMaxHeight(40);
this.setPromptText("Julia ");
this.getItems().addAll("Sierpinski", "Barnsley", "Julia");
......
......@@ -16,5 +16,7 @@ public class GameButton extends Button {
super(text);
this.setMaxWidth(180);
this.setMinWidth(180);
this.setMinHeight(40);
this.setMaxHeight(40);
}
}
......@@ -47,12 +47,12 @@ public class SideBar extends VBox {
chaosGameController::updateFractalColor);
this.getChildren().addAll(
fractalSelectionBox, colorPicker, coordinatesButton,
createOwnFractal, saveFractalButton, openFileButton,
fractalSelectionBox, colorPicker, createOwnFractal,
coordinatesButton, saveFractalButton, openFileButton,
numberOfStepsInput, runGame, resetGame);
this.setAlignment(Pos.CENTER_RIGHT);
VBox.setMargin(coordinatesButton, new Insets(30, 0, 0, 0));
VBox.setMargin(createOwnFractal, new Insets(30, 0, 0, 0));
VBox.setMargin(numberOfStepsInput, new Insets(30, 0, 0, 0));
this.getStyleClass().add("side-bar");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment