Rework login screen

This commit is contained in:
2026-03-11 13:31:28 -06:00
parent 6bc187a055
commit ce0e96523c
2 changed files with 25 additions and 18 deletions

View File

@@ -36,7 +36,7 @@ public class LoginController {
@FXML @FXML
public void initialize() { public void initialize() {
lblError.setText(""); lblError.setText("");
logoContainer.getChildren().setAll(SvgNodeLoader.loadSquare("/org/example/petshopdesktop/images/leons-pet-store-badge-text.svg", 190)); logoContainer.getChildren().setAll(SvgNodeLoader.loadSquare("/org/example/petshopdesktop/images/leons-pet-store-badge-text.svg", 132));
} }
@FXML @FXML

View File

@@ -15,59 +15,63 @@
xmlns:fx="http://javafx.com/fxml/1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.example.petshopdesktop.controllers.LoginController"> fx:controller="org.example.petshopdesktop.controllers.LoginController">
<children> <children>
<VBox alignment="CENTER" fillWidth="true" maxWidth="380.0" prefWidth="380.0" spacing="16.0"> <VBox alignment="TOP_CENTER" fillWidth="true" maxWidth="360.0" prefWidth="360.0" spacing="14.0"
style="-fx-background-color: rgba(33, 52, 71, 0.72); -fx-background-radius: 24; -fx-border-color: rgba(255,255,255,0.06); -fx-border-radius: 24;">
<padding> <padding>
<Insets bottom="40.0" left="50.0" right="50.0" top="40.0" /> <Insets bottom="34.0" left="34.0" right="34.0" top="34.0" />
</padding> </padding>
<children> <children>
<StackPane fx:id="logoContainer" maxHeight="190.0" maxWidth="190.0" minHeight="190.0" minWidth="190.0" prefHeight="190.0" prefWidth="190.0"> <StackPane fx:id="logoContainer" maxHeight="132.0" maxWidth="132.0" minHeight="132.0" minWidth="132.0" prefHeight="132.0" prefWidth="132.0">
<effect> <effect>
<DropShadow blurType="GAUSSIAN" color="0x0f172838" height="18.0" offsetY="6.0" radius="9.0" spread="0.16" width="18.0" /> <DropShadow blurType="GAUSSIAN" color="0x0f172838" height="18.0" offsetY="6.0" radius="9.0" spread="0.16" width="18.0" />
</effect> </effect>
<VBox.margin> <VBox.margin>
<Insets bottom="28.0" left="8.0" /> <Insets bottom="10.0" />
</VBox.margin> </VBox.margin>
</StackPane> </StackPane>
<Label text="Username" textFill="#cccccc"> <Label maxWidth="Infinity" text="Username" textFill="#d7dee6">
<font> <font>
<Font name="System Bold" size="13.0" /> <Font name="System Bold" size="13.0" />
</font> </font>
</Label> </Label>
<TextField fx:id="txtUsername" maxWidth="280.0" prefWidth="280.0" promptText="Enter username" <TextField fx:id="txtUsername" maxWidth="Infinity" prefWidth="292.0" promptText="Enter username"
style="-fx-background-color: #3d5166; -fx-text-fill: white; -fx-prompt-text-fill: #888; -fx-background-radius: 8; -fx-border-width: 0;"> style="-fx-background-color: #40556c; -fx-text-fill: white; -fx-prompt-text-fill: #91a4b7; -fx-background-radius: 10; -fx-border-width: 0;">
<padding> <padding>
<Insets bottom="10.0" left="12.0" right="12.0" top="10.0" /> <Insets bottom="11.0" left="14.0" right="14.0" top="11.0" />
</padding> </padding>
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</TextField> </TextField>
<Label text="Password" textFill="#cccccc"> <Label maxWidth="Infinity" text="Password" textFill="#d7dee6">
<font> <font>
<Font name="System Bold" size="13.0" /> <Font name="System Bold" size="13.0" />
</font> </font>
</Label>
<PasswordField fx:id="txtPassword" maxWidth="280.0" prefWidth="280.0" promptText="Enter password"
style="-fx-background-color: #3d5166; -fx-text-fill: white; -fx-prompt-text-fill: #888; -fx-background-radius: 8; -fx-border-width: 0;">
<padding> <padding>
<Insets bottom="10.0" left="12.0" right="12.0" top="10.0" /> <Insets top="2.0" />
</padding>
</Label>
<PasswordField fx:id="txtPassword" maxWidth="Infinity" prefWidth="292.0" promptText="Enter password"
style="-fx-background-color: #40556c; -fx-text-fill: white; -fx-prompt-text-fill: #91a4b7; -fx-background-radius: 10; -fx-border-width: 0;">
<padding>
<Insets bottom="11.0" left="14.0" right="14.0" top="11.0" />
</padding> </padding>
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</PasswordField> </PasswordField>
<Label fx:id="lblError" maxWidth="280.0" text="" textFill="#FF6B6B" wrapText="true"> <Label fx:id="lblError" maxWidth="Infinity" text="" textFill="#ff8a8a" wrapText="true">
<font> <font>
<Font size="13.0" /> <Font size="13.0" />
</font> </font>
</Label> </Label>
<Button fx:id="btnLogin" maxWidth="280.0" mnemonicParsing="false" onAction="#btnLoginClicked" <Button fx:id="btnLogin" maxWidth="Infinity" mnemonicParsing="false" onAction="#btnLoginClicked"
prefWidth="280.0" prefWidth="292.0"
style="-fx-background-color: #FF6B6B; -fx-background-radius: 8; -fx-cursor: hand;" style="-fx-background-color: #FF6B6B; -fx-background-radius: 10; -fx-cursor: hand;"
text="Login" textFill="WHITE"> text="Login" textFill="WHITE">
<font> <font>
<Font name="System Bold" size="15.0" /> <Font name="System Bold" size="15.0" />
@@ -82,4 +86,7 @@
</children> </children>
</VBox> </VBox>
</children> </children>
<padding>
<Insets bottom="24.0" left="24.0" right="24.0" top="24.0" />
</padding>
</StackPane> </StackPane>