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:
commit
06dde451f3
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue