feat(client/nutrition): updated nutrition UI modelling
Uses "idiomatic JavaFX" to model automatic update propagation by object view models.
This commit is contained in:
parent
b1bb4ad242
commit
1bfc103ecc
5 changed files with 173 additions and 19 deletions
|
|
@ -13,18 +13,15 @@
|
|||
fx:id="nutritionDetails"
|
||||
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>
|
||||
<GridPane fx:id="nutritionValueContainer">
|
||||
<Label GridPane.columnIndex="0" GridPane.rowIndex="0" fx:id="fatInputLabel">Fat: </Label>
|
||||
<TextField GridPane.columnIndex="1" GridPane.rowIndex="0" fx:id="fatInputElement" />
|
||||
<Label GridPane.columnIndex="0" GridPane.rowIndex="1" fx:id="proteinInputLabel">Protein: </Label>
|
||||
<TextField GridPane.columnIndex="1" GridPane.rowIndex="1" fx:id="proteinInputElement" />
|
||||
<Label GridPane.columnIndex="0" GridPane.rowIndex="2" fx:id="carbInputLabel">Carbohydrates: </Label>
|
||||
<TextField GridPane.columnIndex="1" GridPane.rowIndex="2" fx:id="carbInputElement" />
|
||||
</GridPane>
|
||||
<Button onAction="#handleNutritionSaveClick">Save values</Button>
|
||||
<Label fx:id="estimatedKcalLabel">Estimated: 0kcal</Label>
|
||||
<Label fx:id="usageLabel">Not used in any recipes</Label>
|
||||
</VBox>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue