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:
parent
ec5881790d
commit
a7d9fcb37b
3 changed files with 47 additions and 48 deletions
|
|
@ -9,33 +9,32 @@
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?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">
|
|
||||||
|
<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>
|
<children>
|
||||||
<VBox minHeight="200.0" minWidth="200.0">
|
<HBox alignment="CENTER_LEFT" spacing="20.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER_LEFT" spacing="20.0">
|
<Label fx:id="ingredientsLabel" text="Ingredients">
|
||||||
<children>
|
|
||||||
<Label fx:id="ingredientsLabel" text="Ingredients">
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="5.0" top="5.0" />
|
|
||||||
</padding>
|
|
||||||
<font>
|
|
||||||
<Font name="System Bold" size="16.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<HBox alignment="CENTER" spacing="10.0">
|
|
||||||
<children>
|
|
||||||
<Button fx:id="addIngredientButton" mnemonicParsing="false" text="Add" />
|
|
||||||
<Button fx:id="deleteIngredientButton" mnemonicParsing="false" text="Delete" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="10.0" right="10.0" />
|
<Insets bottom="5.0" top="5.0" />
|
||||||
</padding>
|
</padding>
|
||||||
|
<font>
|
||||||
|
<Font name="System Bold" size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<HBox alignment="CENTER" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Button fx:id="addIngredientButton" mnemonicParsing="false" text="Add" />
|
||||||
|
<Button fx:id="deleteIngredientButton" mnemonicParsing="false" text="Delete" />
|
||||||
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<ListView fx:id="ingredientListView" prefHeight="200.0" prefWidth="200.0" />
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
<padding>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
<ListView fx:id="ingredientListView" prefHeight="200.0" prefWidth="200.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</VBox>
|
||||||
|
|
@ -28,8 +28,10 @@
|
||||||
</HBox>
|
</HBox>
|
||||||
|
|
||||||
<!-- Ingredients -->
|
<!-- Ingredients -->
|
||||||
<fx:include source="IngredientList.fxml" fx:id="ingredientList" />
|
<fx:include source="IngredientList.fxml" fx:id="ingredientList"
|
||||||
|
VBox.vgrow="ALWAYS" maxWidth="Infinity" />
|
||||||
|
|
||||||
<!-- Preparation -->
|
<!-- Preparation -->
|
||||||
<fx:include source="RecipeStepList.fxml" fx:id="stepList" />
|
<fx:include source="RecipeStepList.fxml" fx:id="stepList"
|
||||||
|
VBox.vgrow="ALWAYS" maxWidth="Infinity" />
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|
|
||||||
|
|
@ -9,33 +9,31 @@
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?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">
|
<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>
|
<children>
|
||||||
<VBox minHeight="200.0" minWidth="200.0">
|
<HBox alignment="CENTER_LEFT" spacing="20.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER_LEFT" spacing="20.0">
|
<Label fx:id="stepsLabel" text="Steps">
|
||||||
<children>
|
|
||||||
<Label fx:id="stepsLabel" text="Steps">
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="5.0" top="5.0" />
|
|
||||||
</padding>
|
|
||||||
<font>
|
|
||||||
<Font name="System Bold" size="16.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<HBox alignment="CENTER" spacing="10.0">
|
|
||||||
<children>
|
|
||||||
<Button fx:id="addStepButton" mnemonicParsing="false" text="Add" />
|
|
||||||
<Button fx:id="deleteStepButton" mnemonicParsing="false" text="Delete" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="10.0" right="10.0" />
|
<Insets bottom="5.0" top="5.0" />
|
||||||
</padding>
|
</padding>
|
||||||
|
<font>
|
||||||
|
<Font name="System Bold" size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<HBox alignment="CENTER" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Button fx:id="addStepButton" mnemonicParsing="false" text="Add" />
|
||||||
|
<Button fx:id="deleteStepButton" mnemonicParsing="false" text="Delete" />
|
||||||
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<ListView fx:id="recipeStepListView" prefHeight="200.0" prefWidth="200.0" />
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
<padding>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
<ListView fx:id="recipeStepListView" prefHeight="200.0" prefWidth="200.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</VBox>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue