feat: init ui definition nutrition view

This commit is contained in:
Zhongheng Liu 2025-12-16 13:24:11 +01:00
commit 3301c75354
Signed by: steven
GPG key ID: F69B980899C1C09D
5 changed files with 158 additions and 1 deletions

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.Line?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="client.scenes.nutrition.NutritionDetailsCtrl"
prefHeight="400.0" prefWidth="600.0">
<VBox visible="false">
<Label fx:id="ingredientName" />
<HBox>
<Label fx:id="fatInputLabel">Fat: </Label>
<TextField fx:id="fatInputElement" />
</HBox>
<HBox>
<Label fx:id="proteinInputLabel">Protein: </Label>
<TextField fx:id="proteinInputElement" />
</HBox>
<HBox>
<Label fx:id="carbInputLabel">Carbohydrates: </Label>
<TextField fx:id="carbInputElement" />
</HBox>
<Label fx:id="estimatedKcalLabel">Estimated: 0kcal</Label>
<Label fx:id="usageLabel">Not used in any recipes</Label>
</VBox>
</AnchorPane>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="client.scenes.nutrition.NutritionViewCtrl"
prefHeight="400.0" prefWidth="600.0">
<SplitPane>
<ListView fx:id="nutritionIngredientsView" />
<AnchorPane>
<fx:include source="NutritionDetails.fxml" />
</AnchorPane>
</SplitPane>
</AnchorPane>