Skip to content

Commit

Permalink
add styling
Browse files Browse the repository at this point in the history
  • Loading branch information
code-irisnk committed Apr 11, 2024
1 parent ebc5990 commit f89c402
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 2,563 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import org.jxmpp.jid.impl.JidCreate;
import team.elrant.bubbles.xmpp.ConnectedUser;

import java.util.Objects;

/**
* The ChatViewApplication class is responsible for launching the chat application GUI.
* It initializes the primary stage with the ChatView.fxml layout and sets up the ChatViewController.
Expand Down Expand Up @@ -68,7 +70,7 @@ public void start(@NotNull Stage primaryStage) throws Exception {

AnchorPane root = fxmlLoader.load();
@NotNull Scene scene = new Scene(root, 800, 700);

scene.getStylesheets().add(Objects.requireNonNull(getClass().getResource("fluent-light.css")).toExternalForm());
primaryStage.setTitle("Chat");
primaryStage.setScene(scene);
primaryStage.centerOnScreen();
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/team/elrant/bubbles/gui/LoginApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.NotNull;
Expand All @@ -25,7 +26,7 @@ public class LoginApplication extends Application {
* @param args The command-line arguments (not used in this context).
*/
public static void main(String[] args) {
launch();
launch(args);
}

/**
Expand All @@ -40,6 +41,7 @@ public void start(@NotNull Stage stage) throws Exception {
try {
@NotNull FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("LoginView.fxml"));
@NotNull Scene scene = new Scene(fxmlLoader.load(), 280, 200);
scene.getStylesheets().add(Objects.requireNonNull(getClass().getResource("fluent-light.css")).toExternalForm());
stage.setTitle("Login");
stage.setScene(scene);
stage.centerOnScreen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.NotNull;

import java.util.Objects;

public class SideViewApplication extends Application {

private static final Logger logger = LogManager.getLogger(SideViewApplication.class);
Expand All @@ -30,7 +32,7 @@ public void start(@NotNull Stage primaryStage) throws Exception {
@NotNull FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("SideView.fxml"));
AnchorPane root = fxmlLoader.load();
@NotNull Scene scene = new Scene(root, 320, 720);

scene.getStylesheets().add(Objects.requireNonNull(getClass().getResource("fluent-light.css")).toExternalForm());
primaryStage.setTitle("Chat");
primaryStage.setScene(scene);
primaryStage.centerOnScreen();
Expand Down
Loading

0 comments on commit f89c402

Please sign in to comment.