Skip to content

Commit

Permalink
Improve GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
leepoeaik committed Apr 4, 2024
1 parent 2368e4f commit ca41960
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 78 deletions.
1 change: 1 addition & 0 deletions src/main/resources/view/LightTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@

#studentListView {
-fx-padding : 0 20 0 20;
-fx-background-insets: 0;
}

#upcomingLessonLabel {
Expand Down
155 changes: 80 additions & 75 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,82 +16,87 @@
<?import javafx.stage.Stage?>

<fx:root minHeight="600" minWidth="450" onCloseRequest="#handleExit" title="TutorTrack" type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
<icons>
<Image url="@/images/address_book_32.png" />
</icons>
<scene>
<Scene>
<icons>
<Image url="@/images/address_book_32.png" />
</icons>
<scene>
<Scene>

<VBox>
<MenuBar fx:id="menuBar" VBox.vgrow="NEVER">
<Menu mnemonicParsing="false" text="File">
<MenuItem mnemonicParsing="false" onAction="#handleExit" text="Exit" />
</Menu>
<Menu mnemonicParsing="false" text="Help">
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</Menu>
</MenuBar>
<HBox fx:id="labelCommandHolder" prefHeight="18.0" prefWidth="340.0">
<children>
<HBox fx:id="titleLogoLabel" alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="136.0">
<children>
<Label contentDisplay="CENTER" prefHeight="22.0" prefWidth="86.0" text="TutorTrack" textAlignment="RIGHT">
<font>
<Font name="System Bold" size="15.0" />
</font>
</Label>
<ImageView fitHeight="31.0" fitWidth="45.0" nodeOrientation="INHERIT" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@/images/book-logo.png" />
</image>
</ImageView>
</children>
</HBox>
<HBox fx:id="commandTextHBox" alignment="CENTER_RIGHT" minHeight="-Infinity" minWidth="-Infinity" HBox.hgrow="ALWAYS">
<children>
<StackPane fx:id="commandBoxPlaceholder" styleClass="pane-with-border" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox>
</children>
</HBox>
<VBox>
<MenuBar fx:id="menuBar" VBox.vgrow="NEVER">
<Menu mnemonicParsing="false" text="File">
<MenuItem mnemonicParsing="false" onAction="#handleExit" text="Exit" />
</Menu>
<Menu mnemonicParsing="false" text="Help">
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</Menu>
</MenuBar>
<HBox fx:id="labelCommandHolder" prefHeight="18.0" prefWidth="340.0">
<children>
<HBox fx:id="titleLogoLabel" alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="136.0">
<children>
<Label contentDisplay="CENTER" prefHeight="22.0" prefWidth="86.0" text="TutorTrack" textAlignment="RIGHT">
<font>
<Font name="System Bold" size="15.0" />
</font>
</Label>
<ImageView fitHeight="31.0" fitWidth="45.0" nodeOrientation="INHERIT" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@/images/book-logo.png" />
</image>
</ImageView>
</children>
</HBox>
<HBox fx:id="commandTextHBox" alignment="CENTER_RIGHT" minHeight="-Infinity" minWidth="-Infinity" HBox.hgrow="ALWAYS">
<children>
<StackPane fx:id="commandBoxPlaceholder" styleClass="pane-with-border" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox>
</children>
</HBox>

<StackPane fx:id="resultDisplayPlaceholder" maxHeight="100" minHeight="100" prefHeight="100" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>
<HBox fx:id="studentListHBox" prefHeight="100.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<children>
<VBox fx:id="scheduleBox" alignment="CENTER_RIGHT" minWidth="340" prefWidth="340" styleClass="pane-with-border">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<children>
<StackPane fx:id="scheduleListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</children>
</VBox>
<VBox fx:id="studentList" alignment="CENTER_RIGHT" minWidth="340" prefWidth="340" styleClass="pane-with-border" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<StackPane fx:id="studentListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</VBox>
</children>
</HBox>
<StackPane fx:id="resultDisplayPlaceholder" maxHeight="100" minHeight="100" prefHeight="100" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>
<HBox fx:id="studentListHBox" prefHeight="100.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<children>
<VBox fx:id="scheduleBox" alignment="CENTER" minWidth="340" prefWidth="340" styleClass="pane-with-border">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<children>
<Label fx:id="upcomingLessonLabel" text="Upcoming lessons">
<font>
<Font size="24.0" />
</font>
</Label>
<StackPane fx:id="scheduleListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</children>
</VBox>
<VBox fx:id="studentList" alignment="CENTER_RIGHT" minWidth="340" prefWidth="340" styleClass="pane-with-border" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<StackPane fx:id="studentListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</VBox>
</children>
</HBox>

<StackPane fx:id="statusbarPlaceholder" VBox.vgrow="NEVER" />
</VBox>
<stylesheets>
<URL value="@Extensions.css" />
<URL value="@LightTheme.css" />
</stylesheets>
</Scene>
</scene>
<StackPane fx:id="statusbarPlaceholder" VBox.vgrow="NEVER" />
</VBox>
<stylesheets>
<URL value="@Extensions.css" />
<URL value="@LightTheme.css" />
</stylesheets>
</Scene>
</scene>
</fx:root>
5 changes: 2 additions & 3 deletions src/main/resources/view/ResultDisplay.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.StackPane?>

<StackPane fx:id="placeHolder" styleClass="pane-with-border" xmlns="http://javafx.com/javafx/17"
xmlns:fx="http://javafx.com/fxml/1">
<TextArea fx:id="resultDisplay" editable="false" styleClass="result-display"/>
<StackPane fx:id="placeHolder" styleClass="pane-with-border" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
<TextArea fx:id="resultDisplay" editable="false" />
</StackPane>

0 comments on commit ca41960

Please sign in to comment.