From 8989cab770845ec44502d5e86b0ae365217e13bf Mon Sep 17 00:00:00 2001 From: Mei Chang van der Werff Date: Wed, 21 Jan 2026 14:21:30 +0100 Subject: [PATCH] A favourited recipe now becomes blue in text --- .../main/java/client/scenes/FoodpalApplicationCtrl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/main/java/client/scenes/FoodpalApplicationCtrl.java b/client/src/main/java/client/scenes/FoodpalApplicationCtrl.java index e7cb0df..420ac95 100644 --- a/client/src/main/java/client/scenes/FoodpalApplicationCtrl.java +++ b/client/src/main/java/client/scenes/FoodpalApplicationCtrl.java @@ -40,6 +40,7 @@ import javafx.scene.control.ListCell; import javafx.scene.control.ListView; import javafx.scene.control.TextInputDialog; import javafx.scene.control.ToggleButton; +import javafx.scene.paint.Color; import org.apache.commons.lang3.NotImplementedException; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -200,6 +201,12 @@ public class FoodpalApplicationCtrl implements LocaleAware { } //gives star in front fav items boolean fav = config.isFavourite(item.getId()); setText((fav ? "★ " : "") + item.getName()); + + if(fav){ + setTextFill(Color.BLUE); + }else{ + setTextFill(Color.BLACK); + } } }); // When your selection changes, update details in the panel