diff --git a/src/main/resources/fxml/components/header.fxml b/src/main/resources/fxml/components/header.fxml index 49eb0cefacd83b4bbb52b5d724120343117bfb19..a36afefa1f7fbe98d52ad60e24c26d6371443ec4 100644 --- a/src/main/resources/fxml/components/header.fxml +++ b/src/main/resources/fxml/components/header.fxml @@ -1,43 +1,40 @@ <?xml version="1.0" encoding="UTF-8"?> -<?import javafx.scene.control.*?> <?import javafx.scene.Cursor?> <?import javafx.scene.Group?> +<?import javafx.scene.control.MenuButton?> +<?import javafx.scene.control.MenuItem?> +<?import javafx.scene.control.TextField?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> -<?import javafx.scene.layout.*?> +<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.text.Font?> -<AnchorPane prefHeight="40" prefWidth="600" xmlns="http://javafx.com/javafx/17.0.2-ea" - xmlns:fx="http://javafx.com/fxml/1" fx:controller="mi.hdm.controllers.HeaderController"> - <MenuButton contentDisplay="GRAPHIC_ONLY" graphicTextGap="0.0" mnemonicParsing="false" - style="-fx-background-color: transparent;" textFill="TRANSPARENT" AnchorPane.bottomAnchor="0.0" - AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0"> + +<AnchorPane prefHeight="41.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mi.hdm.controllers.HeaderController"> + <MenuButton alignment="TOP_LEFT" contentDisplay="GRAPHIC_ONLY" graphicTextGap="0.0" mnemonicParsing="false" style="-fx-background-color: transparent; -fx-padding: 7;" textFill="TRANSPARENT" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0"> <items> - <MenuItem mnemonicParsing="false" onAction="#changeSceneToHome" text="Home"/> - <MenuItem mnemonicParsing="false" onAction="#changeSceneToMealPlan" text="Meal Plan"/> - <MenuItem mnemonicParsing="false" onAction="#changeSceneToShoppingList" text="Shopping List"/> + <MenuItem mnemonicParsing="false" onAction="#changeSceneToHome" text="Home" /> + <MenuItem mnemonicParsing="false" onAction="#changeSceneToMealPlan" text="Meal Plan" /> + <MenuItem mnemonicParsing="false" onAction="#changeSceneToShoppingList" text="Shopping List" /> </items> <graphic> - <ImageView fitHeight="30.0" fitWidth="45.0" pickOnBounds="true" preserveRatio="true"> - <Image url="@../../images/Tasty_Pages_Menu_Button.png"/> + <ImageView fitHeight="36.0" fitWidth="47.0" pickOnBounds="true" preserveRatio="true"> + <Image url="@../../images/Tasty_Pages_Menu_Button.png" /> </ImageView> </graphic> <cursor> - <Cursor fx:constant="DEFAULT"/> + <Cursor fx:constant="DEFAULT" /> </cursor> <font> - <Font size="0.001"/> + <Font size="0.001" /> </font> </MenuButton> - <Group layoutX="419.0" AnchorPane.rightAnchor="0.0"> - <TextField fx:id="searchBox" alignment="CENTER" onAction="#searchByQuery" prefHeight="40.0" prefWidth="188.0" - promptText="Search for a recipe..." - style="-fx-border-color: D91c1c; -fx-border-width: 2; -fx-border-radius: 10; -fx-background-radius: 10;"/> - <ImageView accessibleRole="BUTTON" fitHeight="28.0" fitWidth="28.0" layoutY="6.0" - onMouseClicked="#searchByQuery" pickOnBounds="true" preserveRatio="true"> - <Image url="@../../images/Tasty_Pages_Search_Material_Design_Icons.png"/> + <Group layoutX="407.0" layoutY="-1.0" AnchorPane.rightAnchor="3.0"> + <TextField fx:id="searchBox" alignment="CENTER" layoutX="-8.0" layoutY="7.0" onAction="#searchByQuery" prefHeight="37.0" prefWidth="188.0" promptText="Search for a recipe..." style="-fx-border-color: D91c1c; -fx-border-width: 2; -fx-border-radius: 10; -fx-background-radius: 10;" /> + <ImageView accessibleRole="BUTTON" fitHeight="28.0" fitWidth="28.0" layoutX="-4.0" layoutY="11.0" onMouseClicked="#searchByQuery" pickOnBounds="true" preserveRatio="true"> + <Image url="@../../images/Tasty_Pages_Search_Material_Design_Icons.png" /> <cursor> - <Cursor fx:constant="HAND"/> + <Cursor fx:constant="HAND" /> </cursor> </ImageView> </Group>