From 5360baf71120422bf122fedc90dcbd01597c0a1e Mon Sep 17 00:00:00 2001 From: KrashKart Date: Sun, 20 Oct 2024 13:50:26 +0800 Subject: [PATCH] Add gaps between tags Set FlowPane horizontal and vertical gap to 5 --- src/main/java/seedu/address/ui/PersonCard.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/ui/PersonCard.java b/src/main/java/seedu/address/ui/PersonCard.java index 3f0c67770d8..12de8e1e019 100644 --- a/src/main/java/seedu/address/ui/PersonCard.java +++ b/src/main/java/seedu/address/ui/PersonCard.java @@ -34,8 +34,6 @@ public class PersonCard extends UiPart { private Label id; @FXML private Label phone; - // @FXML - // private Label address; @FXML private Label email; @FXML @@ -50,10 +48,13 @@ public PersonCard(Person person, int displayedIndex) { id.setText(displayedIndex + ". "); name.setText(person.getName().fullName); phone.setText(person.getPhone().value); - // address.setText(person.getAddress().value); // to be removed completely email.setText(person.getEmail().value); person.getTags().stream() .sorted(Comparator.comparing(tag -> tag.tagName)) .forEach(tag -> tags.getChildren().add(new Label(tag.tagName))); + + // add horizontal and vertical gaps for the tags FlowPane + tags.setHgap(5); + tags.setVgap(5); } }