diff --git a/hellofx/app/build/resources/main/client/style.css b/hellofx/app/build/resources/main/client/style.css index 626bad8..8c5bd55 100644 --- a/hellofx/app/build/resources/main/client/style.css +++ b/hellofx/app/build/resources/main/client/style.css @@ -1,5 +1,6 @@ GridPane{ -fx-background-color: #282C34; + -fx-margin: 10px; } Label{ diff --git a/hellofx/app/src/main/java/client/MainController.java b/hellofx/app/src/main/java/client/MainController.java index 75ce427..4800fb8 100644 --- a/hellofx/app/src/main/java/client/MainController.java +++ b/hellofx/app/src/main/java/client/MainController.java @@ -2,6 +2,7 @@ package client; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; +import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; @@ -12,6 +13,7 @@ import javafx.stage.Stage; import res.Event; import res.DataController; +import javafx.event.ActionEvent; import java.io.IOException; import java.util.Objects; @@ -39,12 +41,13 @@ public class MainController { protected void onAddBtnClick(){ try{ FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml")); - Scene scene = new Scene(fxmlLoader.load(), 600, 400); + Scene scene = new Scene(fxmlLoader.load(), 700, 500); scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm()); Stage stage = new Stage(); stage.setTitle("Termin erstellen"); stage.setScene(scene); stage.initModality(Modality.APPLICATION_MODAL); + stage.setResizable(false); stage.showAndWait(); } catch (IOException e){ @@ -62,4 +65,10 @@ public class MainController { vBoxWen.getChildren().add(label); } } + + @FXML + protected void createBtnClick(ActionEvent event){ + Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); + stage.close(); + } } \ No newline at end of file diff --git a/hellofx/app/src/main/resources/client/create-event.css b/hellofx/app/src/main/resources/client/create-event.css index 5094b00..edc40ed 100644 --- a/hellofx/app/src/main/resources/client/create-event.css +++ b/hellofx/app/src/main/resources/client/create-event.css @@ -1,3 +1,25 @@ GridPane{ -fx-background-color: #3E415F; + -fx-padding: 20px; + -fx-font-size: 20px; + -fx-font-family: Segoe UI; +} + +Label{ + -fx-text-fill: white; + -fx-max-width: 150px; + -fx-min-width: 150px; +} + +.mainLabel{ + -fx-background-color: #8D99AE; + -fx-padding: 10px; + -fx-max-width: 200px; + -fx-min-width: 200px; + -fx-font-weight: bold; + -fx-alignment: center; +} + +.inputField{ + -fx-padding: 10px; } \ No newline at end of file diff --git a/hellofx/app/src/main/resources/client/create-event.fxml b/hellofx/app/src/main/resources/client/create-event.fxml index 68dfb48..116b1fe 100644 --- a/hellofx/app/src/main/resources/client/create-event.fxml +++ b/hellofx/app/src/main/resources/client/create-event.fxml @@ -1,11 +1,43 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hellofx/app/src/main/resources/client/style.css b/hellofx/app/src/main/resources/client/style.css index 626bad8..8c5bd55 100644 --- a/hellofx/app/src/main/resources/client/style.css +++ b/hellofx/app/src/main/resources/client/style.css @@ -1,5 +1,6 @@ GridPane{ -fx-background-color: #282C34; + -fx-margin: 10px; } Label{