Merge branch 'feature/fav-highlight' into 'main'

A favourited recipe now becomes blue in text

Closes #74

See merge request cse1105/2025-2026/teams/csep-team-76!77
This commit is contained in:
Mei Chang van der Werff 2026-01-21 14:46:35 +01:00
commit 06dde451f3

View file

@ -40,6 +40,7 @@ import javafx.scene.control.ListCell;
import javafx.scene.control.ListView; import javafx.scene.control.ListView;
import javafx.scene.control.TextInputDialog; import javafx.scene.control.TextInputDialog;
import javafx.scene.control.ToggleButton; import javafx.scene.control.ToggleButton;
import javafx.scene.paint.Color;
import org.apache.commons.lang3.NotImplementedException; import org.apache.commons.lang3.NotImplementedException;
import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
@ -200,6 +201,12 @@ public class FoodpalApplicationCtrl implements LocaleAware {
} //gives star in front fav items } //gives star in front fav items
boolean fav = config.isFavourite(item.getId()); boolean fav = config.isFavourite(item.getId());
setText((fav ? "" : "") + item.getName()); setText((fav ? "" : "") + item.getName());
if(fav){
setTextFill(Color.BLUE);
}else{
setTextFill(Color.BLACK);
}
} }
}); });
// When your selection changes, update details in the panel // When your selection changes, update details in the panel