diff --git a/src/main/java/seedu/address/model/tag/TagCategory.java b/src/main/java/seedu/address/model/tag/TagCategory.java index d48e7cf36ff..775caf5b8c1 100644 --- a/src/main/java/seedu/address/model/tag/TagCategory.java +++ b/src/main/java/seedu/address/model/tag/TagCategory.java @@ -6,7 +6,7 @@ * Provides categories to sort Tags into, as well as colour codes for display in the UI. */ public enum TagCategory { - GENERAL("#ECECEC"), // Light Grey for default color + GENERAL("#A9A9A9"), // Dark Grey for default color ACADEMICS("#FFD700"), // Gold ACTIVITIES("#1E90FF"), // Dodger Blue NETWORKING("#32CD32"), // Lime Green diff --git a/src/main/java/seedu/address/ui/PersonCard.java b/src/main/java/seedu/address/ui/PersonCard.java index e54ddba8a8d..a1a95aba244 100644 --- a/src/main/java/seedu/address/ui/PersonCard.java +++ b/src/main/java/seedu/address/ui/PersonCard.java @@ -47,12 +47,18 @@ public PersonCard(Person person, int displayedIndex) { name.setText(person.getName().fullName); phone.setText(person.getPhone().value); email.setText(person.getEmail().value); - person.getOrderedTags() - .forEach(tag -> tags.getChildren().add(new Label(tag.tagName + " " + tag.getTagCategory()))); - + syncPersonTagDetails(person); // add horizontal and vertical gaps for the tags FlowPane tags.setHgap(5); tags.setVgap(5); } + + private void syncPersonTagDetails(Person person) { + person.getOrderedTags().forEach(tag -> { + Label tagLabel = new Label(tag.tagName); + tagLabel.setStyle("-fx-padding: 2; -fx-background-color: " + tag.getTagColour()); + tags.getChildren().add(tagLabel); + }); + } }