Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/main/java/todoapp/ui/TodoUi.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public Node createTodoNode(Todo todo) {
Label label = new Label(todo.getContent());
label.setMinHeight(28);
Button button = new Button("done");

// friend's color + existing action
button.setStyle("-fx-background-color: #9e9e9e; -fx-text-fill: white;"); // Grey background, white text
button.setOnAction(e -> {
todoService.markDone(todo.getId());
redrawTodolist();
Expand Down Expand Up @@ -87,20 +90,20 @@ public void start(Stage primaryStage) {
loginLabel.setFont(Font.font("Segoe UI", FontWeight.BOLD, 16));

TextField usernameInput = new TextField();

// (kept) highlight the input field
usernameInput.setStyle("-fx-control-inner-background: yellow;");

inputPane.getChildren().addAll(loginLabel, usernameInput);

Label loginMessage = new Label();

Button loginButton = new Button("login");
// friend's button color + your font
// friend's color + your font
loginButton.setStyle("-fx-base: #2196F3; -fx-text-fill: white;");
loginButton.setFont(Font.font("Segoe UI", FontWeight.BOLD, 14));

Button createButton = new Button("create new user");
// friend's button color + your font
// friend's color + your font
createButton.setStyle("-fx-base: #FF9800;");
createButton.setFont(Font.font("Segoe UI", FontWeight.BOLD, 14));

Expand Down Expand Up @@ -151,6 +154,8 @@ public void start(Stage primaryStage) {
userCreationMessage.setFont(Font.font("Segoe UI", FontWeight.BOLD, 12));

Button createNewUserButton = new Button("create");
// friend's color + your font
createNewUserButton.setStyle("-fx-background-color: #FF9800; -fx-text-fill: white;");
createNewUserButton.setPadding(new Insets(10));
createNewUserButton.setFont(Font.font("Segoe UI", FontWeight.BOLD, 14));

Expand Down Expand Up @@ -186,8 +191,11 @@ public void start(Stage primaryStage) {
HBox menuPane = new HBox(10);
Region menuSpacer = new Region();
HBox.setHgrow(menuSpacer, Priority.ALWAYS);

Button logoutButton = new Button("logout");
// keep both: your fonts + friend's color
menuLabel.setFont(Font.font("Segoe UI", FontWeight.BOLD, 14));
logoutButton.setStyle("-fx-background-color: #f44336; -fx-text-fill: white;");
logoutButton.setFont(Font.font("Segoe UI", FontWeight.BOLD, 14));
menuPane.getChildren().addAll(menuLabel, menuSpacer, logoutButton);

Expand All @@ -198,7 +206,10 @@ public void start(Stage primaryStage) {

HBox createForm = new HBox(10);
Button createTodo = new Button("create");
// keep both: friend's color + your font
createTodo.setStyle("-fx-background-color: #4CAF50; -fx-text-fill: white;");
createTodo.setFont(Font.font("Segoe UI", FontWeight.BOLD, 14));

Region spacer = new Region();
HBox.setHgrow(spacer, Priority.ALWAYS);
TextField newTodoInput = new TextField();
Expand Down