improved the main view and the main-view.css

This commit is contained in:
Alex Aleksej Rechtin 2021-11-26 13:01:08 +01:00
parent 842a83af3b
commit 6a40ebfcfc
3 changed files with 24 additions and 16 deletions

View File

@ -13,7 +13,7 @@ public class MainApplication extends Application {
public void start(Stage stage) throws IOException { public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml")); FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 1200, 700); Scene scene = new Scene(fxmlLoader.load(), 1200, 700);
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("style.css")).toExternalForm()); scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("main-view.css")).toExternalForm());
stage.setTitle("Hello!"); stage.setTitle("Hello!");
stage.setScene(scene); stage.setScene(scene);
stage.show(); stage.show();

View File

@ -1,3 +1,7 @@
GridPane{
-fx-background-color: #2B2D42;
}
.main-panel{ .main-panel{
-fx-background-color: #282C34; -fx-background-color: #282C34;
} }
@ -9,22 +13,26 @@
} }
.gridCalendar Line{ .gridCalendar Line{
-fx-stroke: white; -fx-stroke: #B0B0B0;
} }
.gridCalender{ .gridCalender{
-fx-background-color: #2B2D42;
-fx-min-height: 80px; -fx-min-height: 80px;
-fx-max-height: 80px; -fx-max-height: 80px;
} }
.labelMonth{ .labelMonth{
-fx-padding: 0 0 0 20;
-fx-background-color: #77859E;
-fx-font-size: 35px; -fx-font-size: 35px;
-fx-font-weight: bold; -fx-font-weight: bold;
} }
.labelDays{ .labelDays{
-fx-alignment: center;
-fx-background-color: #525E74; -fx-background-color: #525E74;
-fx-font-size: 30px; -fx-font-size: 25px;
} }
Label{ Label{

View File

@ -5,7 +5,7 @@
<?import javafx.scene.image.*?> <?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<GridPane style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController"> <GridPane style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="NEVER" maxWidth="60.0" minWidth="60.0" /> <ColumnConstraints hgrow="NEVER" maxWidth="60.0" minWidth="60.0" />
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
@ -13,7 +13,7 @@
<rowConstraints> <rowConstraints>
<RowConstraints vgrow="SOMETIMES" /> <RowConstraints vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" spacing="5.0" style="-fx-background-color: #333333;"> <VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" spacing="5.0" style="-fx-background-color: #525E74;">
<ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true">
</ImageView> </ImageView>
@ -34,18 +34,18 @@
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints /> <RowConstraints />
<RowConstraints vgrow="ALWAYS"/> <RowConstraints vgrow="ALWAYS" />
</rowConstraints> </rowConstraints>
<Label styleClass="labelMonth" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelMonth" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="0">
Monat Monat
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<GridPane fx:id="calendarGrid" gridLinesVisible="true" styleClass="gridCalendar" GridPane.columnIndex="0" GridPane.rowIndex="1"> <GridPane fx:id="calendarGrid" gridLinesVisible="true" styleClass="gridCalendar" GridPane.columnIndex="0" GridPane.rowIndex="1">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" maxWidth="14.2857142857" minWidth="14.2857142857" /> <ColumnConstraints hgrow="ALWAYS" maxWidth="14.2857142857" minWidth="14.2857142857" percentWidth="14.2857142857" />
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" /> <ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" /> <ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" /> <ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
@ -57,43 +57,43 @@
<RowConstraints maxHeight="55.0" minHeight="25.0" vgrow="NEVER" /> <RowConstraints maxHeight="55.0" minHeight="25.0" vgrow="NEVER" />
<RowConstraints percentHeight="-Infinity" vgrow="ALWAYS" /> <RowConstraints percentHeight="-Infinity" vgrow="ALWAYS" />
</rowConstraints> </rowConstraints>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="0">
Montag Montag
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="1" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="1" GridPane.rowIndex="0">
Dienstag Dienstag
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="2" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="2" GridPane.rowIndex="0">
Mittwoch Mittwoch
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="3" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="3" GridPane.rowIndex="0">
Donnerstag Donnerstag
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="4" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="4" GridPane.rowIndex="0">
Freitag Freitag
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="5" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="5" GridPane.rowIndex="0">
Samstag Samstag
<padding> <padding>
<Insets left="5" /> <Insets left="5" />
</padding> </padding>
</Label> </Label>
<Label styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="6" GridPane.rowIndex="0"> <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="6" GridPane.rowIndex="0">
Sonntag Sonntag
<padding> <padding>
<Insets left="5" /> <Insets left="5" />