Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103T-W13-4#62 from nobodyishappy/branc…
Browse files Browse the repository at this point in the history
…h-UI

Update to UI
  • Loading branch information
breezetall authored Apr 4, 2024
2 parents d0f6434 + 43c091f commit 2e52b13
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/main/java/seedu/address/ui/TaskCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -350,3 +356,4 @@
-fx-background-radius: 2;
-fx-font-size: 11;
}

2 changes: 1 addition & 1 deletion src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.stage.Stage?>

<fx:root minHeight="600" minWidth="780.0" onCloseRequest="#handleExit" title="Address App" type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
<fx:root minHeight="600" minWidth="780.0" onCloseRequest="#handleExit" title="TeamTracker" type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
<icons>
<Image url="@/images/address_book_32.png" />
</icons>
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/view/PersonListPanel.fxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.VBox?>

<VBox xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<Label fx:id="listname" text="List of Person" styleClass="cell_head_label" />
<ListView fx:id="personListView" VBox.vgrow="ALWAYS" />
</VBox>
2 changes: 2 additions & 0 deletions src/main/resources/view/TaskListPanel.fxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.VBox?>

<VBox xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<Label fx:id="listname" text="List of Task" styleClass="cell_head_label" />
<ListView fx:id="taskListView" VBox.vgrow="ALWAYS" />
</VBox>

0 comments on commit 2e52b13

Please sign in to comment.