style(client): align ingredient and step list widths

- Remove AnchorPane wrappers from IngredientList and RecipeStepList
- Set maxWidth to Infinity on root VBox elements
- Set maxWidth to Infinity on ListView components
- Both lists now have consistent widths and fill container space

Fixes #48
This commit is contained in:
Rithvik Sriram 2026-01-09 16:33:01 +01:00
commit a7d9fcb37b
3 changed files with 47 additions and 48 deletions

View file

@ -9,9 +9,10 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.scenes.recipe.IngredientListCtrl">
<children>
<VBox minHeight="200.0" minWidth="200.0">
<VBox xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="client.scenes.recipe.IngredientListCtrl"
minHeight="200.0" minWidth="200.0" maxWidth="Infinity">
<children>
<HBox alignment="CENTER_LEFT" spacing="20.0">
<children>
@ -37,5 +38,3 @@
<ListView fx:id="ingredientListView" prefHeight="200.0" prefWidth="200.0" />
</children>
</VBox>
</children>
</AnchorPane>

View file

@ -28,8 +28,10 @@
</HBox>
<!-- Ingredients -->
<fx:include source="IngredientList.fxml" fx:id="ingredientList" />
<fx:include source="IngredientList.fxml" fx:id="ingredientList"
VBox.vgrow="ALWAYS" maxWidth="Infinity" />
<!-- Preparation -->
<fx:include source="RecipeStepList.fxml" fx:id="stepList" />
<fx:include source="RecipeStepList.fxml" fx:id="stepList"
VBox.vgrow="ALWAYS" maxWidth="Infinity" />
</VBox>

View file

@ -9,9 +9,9 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.scenes.recipe.RecipeStepListCtrl">
<children>
<VBox minHeight="200.0" minWidth="200.0">
<VBox xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="client.scenes.recipe.RecipeStepListCtrl"
minHeight="200.0" minWidth="200.0" maxWidth="Infinity">
<children>
<HBox alignment="CENTER_LEFT" spacing="20.0">
<children>
@ -37,5 +37,3 @@
<ListView fx:id="recipeStepListView" prefHeight="200.0" prefWidth="200.0" />
</children>
</VBox>
</children>
</AnchorPane>