From be8213102480537062c916d6a8447681b306fa31 Mon Sep 17 00:00:00 2001
From: tornhale <hannes.lt.tornberg@student.jyu.fi>
Date: Fri, 31 Jan 2025 14:15:31 +0200
Subject: [PATCH] =?UTF-8?q?p=C3=A4=C3=A4ikkunaa=20paranneltu?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/fxKirjalista/KirjalistaGUIView.fxml | 249 +++++++++++++-----------
 1 file changed, 134 insertions(+), 115 deletions(-)

diff --git a/src/fxKirjalista/KirjalistaGUIView.fxml b/src/fxKirjalista/KirjalistaGUIView.fxml
index d4d6790..6ef3c1f 100644
--- a/src/fxKirjalista/KirjalistaGUIView.fxml
+++ b/src/fxKirjalista/KirjalistaGUIView.fxml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<?import com.gluonhq.charm.glisten.control.TextField?>
 <?import javafx.geometry.Insets?>
 <?import javafx.scene.control.Button?>
 <?import javafx.scene.control.Label?>
@@ -9,6 +8,7 @@
 <?import javafx.scene.control.MenuItem?>
 <?import javafx.scene.control.ScrollPane?>
 <?import javafx.scene.control.SplitMenuButton?>
+<?import javafx.scene.control.TextField?>
 <?import javafx.scene.layout.AnchorPane?>
 <?import javafx.scene.layout.BorderPane?>
 <?import javafx.scene.layout.ColumnConstraints?>
@@ -17,94 +17,20 @@
 <?import javafx.scene.layout.RowConstraints?>
 <?import javafx.scene.layout.VBox?>
 
-<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="327.0" prefWidth="88.0" stylesheets="@kirjalista.css" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxKirjalista.KirjalistaGUIController">
-   <top>
-      <MenuBar BorderPane.alignment="CENTER">
-        <menus>
-          <Menu mnemonicParsing="false" text="Tiedosto">
-            <items>
-               <MenuItem text="Tallenna">
-               </MenuItem>
-               <MenuItem text="Avaa...">
-               </MenuItem>
-               <MenuItem mnemonicParsing="false" text="Tulosta...">
-               </MenuItem>
-            </items>
-          </Menu>
-          <Menu mnemonicParsing="false" text="Muokkaa">
-            <items>
-              <MenuItem mnemonicParsing="false" text="Poista" />
-            </items>
-          </Menu>
-          <Menu mnemonicParsing="false" text="Apua">
-            <items>
-            <MenuItem mnemonicParsing="false" text="Tietoja" />
-            </items>
-          </Menu>
-        </menus>
-      </MenuBar>
-   </top>
-   <left>
-      <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
-         <center>
-            <Label maxHeight="10.0" maxWidth="50.0" text="Kirjat" BorderPane.alignment="CENTER_LEFT">
-               <BorderPane.margin>
-                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
-               </BorderPane.margin>
-            </Label>
-         </center>
-         <bottom>
-            <ScrollPane pannable="true" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
-              <content>
-                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0">
-                     <children>
-                        <Label text="Hobitti">
-                           <padding>
-                              <Insets bottom="5.0" left="5.0" right="150.0" top="5.0" />
-                           </padding>
-                        </Label>
-                        <Label layoutY="28.0" text="Taru sormusten herrasta">
-                           <padding>
-                              <Insets bottom="5.0" left="5.0" right="150.0" top="5.0" />
-                           </padding>
-                        </Label>
-                        <Label layoutY="56.0" text="Java-ohjelmointi">
-                           <padding>
-                              <Insets bottom="5.0" left="5.0" right="150.0" top="5.0" />
-                           </padding>
-                        </Label>
-                     </children></AnchorPane>
-              </content>
-            </ScrollPane>
-         </bottom>
-         <top>
-            <VBox BorderPane.alignment="CENTER">
-               <children>
-                  <SplitMenuButton mnemonicParsing="false" text="Hakuehto">
-                    <items>
-                      <MenuItem mnemonicParsing="false" text="Nimi" />
-                      <MenuItem mnemonicParsing="false" text="Kirjailija" />
-                      <MenuItem mnemonicParsing="false" text="Genre" />
-                    </items>
-                  </SplitMenuButton>
-                  <TextField floatText="Haku 🔍" opacity="0.85">
-                     <VBox.margin>
-                        <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
-                     </VBox.margin>
-                  </TextField>
-               </children>
-            </VBox>
-         </top>
-      </BorderPane>
-   </left>
+<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="400.0" prefWidth="499.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxKirjalista.KirjalistaGUIController">
    <right>
-      <BorderPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
-         <center>
-            <ScrollPane pannable="true" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
+      <VBox maxHeight="400.0" maxWidth="258.0" prefHeight="400.0" prefWidth="258.0" BorderPane.alignment="CENTER">
+         <children>
+            <Label text="Kirjan tiedot:">
+               <VBox.margin>
+                  <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
+               </VBox.margin>
+            </Label>
+            <ScrollPane prefHeight="383.0" prefWidth="274.0">
               <content>
-                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0">
+                <AnchorPane prefHeight="384.0" prefWidth="224.0">
                      <children>
-                        <GridPane layoutY="-2.0" prefHeight="201.0" prefWidth="199.0">
+                        <GridPane layoutX="-1.0" layoutY="1.0" prefHeight="235.0" prefWidth="238.0">
                           <columnConstraints>
                             <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                             <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
@@ -113,57 +39,150 @@
                             <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                             <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                             <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
-                            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
-                            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />                            
+                              <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
+                              <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                           </rowConstraints>
-                           <opaqueInsets>
-                              <Insets left="5.0" right="5.0" />
-                           </opaqueInsets>
                            <children>
-                              <Label text="Nimi:" />
-                              <Label text="Kirjailija:" GridPane.rowIndex="1" />
-                              <Label text="Kirjasarja:" GridPane.rowIndex="2" />
-                              <Label text="Genre:" GridPane.rowIndex="3" />
-                              <Label text="Julkaisuvuosi:" GridPane.rowIndex="4" />
-
-                              <TextField text="Hobitti" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
+                              <Label text="Nimi:">
                                  <GridPane.margin>
                                     <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
-                                 </GridPane.margin></TextField>
-                              <TextField text="J.R.R. Tolkien" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1">
+                                 </GridPane.margin>
+                              </Label>
+                              <Label text="Kirjailija:" GridPane.rowIndex="1">
                                  <GridPane.margin>
                                     <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
-                                 </GridPane.margin></TextField>
-                              <TextField text="-" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="2">
+                                 </GridPane.margin>
+                              </Label>
+                              <Label text="Kirjasarja:" GridPane.rowIndex="2">
                                  <GridPane.margin>
                                     <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
-                                 </GridPane.margin></TextField>
-                              <TextField text="Fantasia" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="3">
+                                 </GridPane.margin>
+                              </Label>
+                              <Label text="Genre:" GridPane.rowIndex="3">
                                  <GridPane.margin>
                                     <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
-                                 </GridPane.margin></TextField>
-                              <TextField text="1937" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="4">
+                                 </GridPane.margin>
+                              </Label>
+                              <Label text="Julkaisuvuosi:" GridPane.rowIndex="4">
                                  <GridPane.margin>
                                     <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
-                                 </GridPane.margin></TextField>
-
+                                 </GridPane.margin>
+                              </Label>
+                              <TextField text="Hobitti" GridPane.columnIndex="1">
+                                 <GridPane.margin>
+                                    <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                                 </GridPane.margin>
+                              </TextField>
+                              <TextField text="J.R.R. Tolkien" GridPane.columnIndex="1" GridPane.rowIndex="1">
+                                 <GridPane.margin>
+                                    <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                                 </GridPane.margin>
+                              </TextField>
+                              <TextField text="-" GridPane.columnIndex="1" GridPane.rowIndex="2">
+                                 <GridPane.margin>
+                                    <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                                 </GridPane.margin>
+                              </TextField>
+                              <TextField text="Fantasia" GridPane.columnIndex="1" GridPane.rowIndex="3">
+                                 <GridPane.margin>
+                                    <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                                 </GridPane.margin>
+                              </TextField>
+                              <TextField text="1937" GridPane.columnIndex="1" GridPane.rowIndex="4">
+                                 <GridPane.margin>
+                                    <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                                 </GridPane.margin>
+                              </TextField>
                            </children>
                         </GridPane>
-                     </children></AnchorPane>
+                     </children>
+                  </AnchorPane>
               </content>
             </ScrollPane>
-         </center>
-         <top>
-            <Label text="Kirjan tiedot" BorderPane.alignment="CENTER_LEFT" />
-         </top>
-      </BorderPane>
+         </children></VBox>
    </right>
+   <left>
+      <VBox prefHeight="330.0" prefWidth="300.0" BorderPane.alignment="CENTER">
+         <children>
+            <HBox prefHeight="38.0" prefWidth="250.0">
+               <children>
+                  <TextField opacity="0.58" promptText="Haku🔍" />
+                  <SplitMenuButton mnemonicParsing="false" text="Hakuehto">
+                    <items>
+                      <MenuItem mnemonicParsing="false" text="Nimi" />
+                      <MenuItem mnemonicParsing="false" text="Kirjailija" />
+                        <MenuItem mnemonicParsing="false" text="Genre" />
+                    </items>
+                  </SplitMenuButton>
+               </children>
+               <VBox.margin>
+                  <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
+               </VBox.margin>
+            </HBox>
+            <Label text="Kirjat:">
+               <VBox.margin>
+                  <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
+               </VBox.margin>
+            </Label>
+            <ScrollPane prefHeight="311.0" prefWidth="256.0">
+              <content>
+                <AnchorPane prefHeight="336.0" prefWidth="267.0">
+                     <children>
+                        <Label text="Hobitti">
+                           <padding>
+                              <Insets bottom="5.0" left="5.0" right="150.0" top="5.0" />
+                           </padding>
+                        </Label>
+                        <Label layoutY="28.0" prefHeight="27.0" prefWidth="284.0" text="Taru sormusten herrasta">
+                           <padding>
+                              <Insets bottom="5.0" left="5.0" right="150.0" top="5.0" />
+                           </padding>
+                        </Label>
+                        <Label layoutY="56.0" text="Java-ohjelmointi">
+                           <padding>
+                              <Insets bottom="5.0" left="5.0" right="150.0" top="5.0" />
+                           </padding>
+                        </Label>
+                     </children>
+                  </AnchorPane>
+              </content>
+            </ScrollPane>
+         </children>
+      </VBox>
+   </left>
+   <top>
+      <MenuBar BorderPane.alignment="CENTER">
+        <menus>
+          <Menu mnemonicParsing="false" text="Tiedosto">
+            <items>
+              <MenuItem mnemonicParsing="false" text="Tallenna" />
+                  <MenuItem mnemonicParsing="false" text="Avaa" />
+                  <MenuItem mnemonicParsing="false" text="Tulosta" />
+            </items>
+          </Menu>
+          <Menu mnemonicParsing="false" text="Muokkaa">
+            <items>
+              <MenuItem mnemonicParsing="false" text="Muokkaa" />
+                  <MenuItem mnemonicParsing="false" text="Poista" />
+            </items>
+          </Menu>
+          <Menu mnemonicParsing="false" text="Apua">
+            <items>
+              <MenuItem mnemonicParsing="false" text="Tietoja" />
+            </items>
+          </Menu>
+        </menus>
+         <padding>
+            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+         </padding>
+      </MenuBar>
+   </top>
    <bottom>
       <HBox BorderPane.alignment="CENTER">
          <children>
             <Button mnemonicParsing="false" text="Lisää kirja">
                <HBox.margin>
-                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                  <Insets bottom="5.0" left="7.0" right="5.0" top="5.0" />
                </HBox.margin>
             </Button>
             <Button mnemonicParsing="false" text="Muokkaa">
-- 
GitLab