From 754ecac790f5e5bae2cdf1b33119b622a5b8dad3 Mon Sep 17 00:00:00 2001 From: Tang Hao Liang Date: Thu, 4 Apr 2024 12:17:11 +0800 Subject: [PATCH 1/2] Update to UI --- src/main/java/seedu/address/ui/TaskCard.java | 16 ++++++++++++++++ src/main/resources/view/DarkTheme.css | 1 + src/main/resources/view/MainWindow.fxml | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/ui/TaskCard.java b/src/main/java/seedu/address/ui/TaskCard.java index af331ed6dc4..a680f492a4a 100644 --- a/src/main/java/seedu/address/ui/TaskCard.java +++ b/src/main/java/seedu/address/ui/TaskCard.java @@ -51,5 +51,21 @@ public TaskCard(Task task, int displayedIndex) { status.setText(task.getStatus().toString()); description.setText(task.getDescription().taskDescription); deadline.setText(task.getDeadline().toString()); + + String settings = "-fx-padding: 1 3 1 3; -fx-border-radius: 2; -fx-background-radius: 2; -fx-font-size: 12;"; + + if (task.getPriority().toString().equalsIgnoreCase("low")) { + priority.setStyle("-fx-background-color: #00ff00;" + settings); + } else if (task.getPriority().toString().equalsIgnoreCase("medium")) { + priority.setStyle("-fx-background-color: #ffae00;" + settings); + } else if (task.getPriority().toString().equalsIgnoreCase("high")) { + priority.setStyle("-fx-background-color: #ff0000;" + settings); + } + + if (task.getStatus().toString().equalsIgnoreCase("Done")) { + status.setStyle("-fx-background-color: #00ff00;" + settings); + } else if (task.getStatus().toString().equalsIgnoreCase("Not Done")) { + status.setStyle("-fx-background-color: #ff0000;" + settings); + } } } diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index d57979913fb..d52bd881339 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -350,3 +350,4 @@ -fx-background-radius: 2; -fx-font-size: 11; } + diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index c25ec8f7d3b..5de96ce99e5 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -12,7 +12,7 @@ - + From 43c091f2c53a12e91f648009ec2cefe735326e78 Mon Sep 17 00:00:00 2001 From: Tang Hao Liang Date: Thu, 4 Apr 2024 12:33:20 +0800 Subject: [PATCH 2/2] Add headings to lists --- src/main/resources/view/DarkTheme.css | 6 ++++++ src/main/resources/view/PersonListPanel.fxml | 2 ++ src/main/resources/view/TaskListPanel.fxml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index d52bd881339..9d9891c3960 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -120,6 +120,12 @@ -fx-text-fill: white; } +.cell_head_label { + -fx-font-family: "Segoe UI Semibold"; + -fx-font-size: 20px; + -fx-text-fill: white; +} + .cell_big_label { -fx-font-family: "Segoe UI Semibold"; -fx-font-size: 16px; diff --git a/src/main/resources/view/PersonListPanel.fxml b/src/main/resources/view/PersonListPanel.fxml index a1bb6bbace8..a5207ad7186 100644 --- a/src/main/resources/view/PersonListPanel.fxml +++ b/src/main/resources/view/PersonListPanel.fxml @@ -1,8 +1,10 @@ + + diff --git a/src/main/resources/view/TaskListPanel.fxml b/src/main/resources/view/TaskListPanel.fxml index 9753448ffdb..1f994f8019f 100644 --- a/src/main/resources/view/TaskListPanel.fxml +++ b/src/main/resources/view/TaskListPanel.fxml @@ -1,8 +1,10 @@ + +