Skip to content

Commit

Permalink
Merge pull request #61 from random689/Update_GUI_size
Browse files Browse the repository at this point in the history
Update GUI
  • Loading branch information
yongchuann authored Oct 13, 2021
2 parents 32c1e7b + a7e5c8e commit f98d9d2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class MainWindow extends UiPart<Stage> {
private MenuItem helpMenuItem;

@FXML
private StackPane studentListPanelPlaceholder;
private StackPane personListPanelPlaceholder;

@FXML
private StackPane resultDisplayPlaceholder;
Expand Down Expand Up @@ -111,7 +111,7 @@ private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {
*/
void fillInnerParts() {
personListPanel = new PersonListPanel(logic.getFilteredPersonList());
studentListPanelPlaceholder.getChildren().add(personListPanel.getRoot());
personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());

resultDisplay = new ResultDisplay();
resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/seedu/address/ui/PersonListPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public class PersonListPanel extends UiPart<Region> {
private final Logger logger = LogsCenter.getLogger(PersonListPanel.class);

@FXML
private ListView<Person> studentListView;
private ListView<Person> personListView;

/**
* Creates a {@code StudentListPanel} with the given {@code ObservableList}.
* Creates a {@code PersonListPanel} with the given {@code ObservableList}.
*/
public PersonListPanel(ObservableList<Person> personList) {
super(FXML);
studentListView.setItems(personList);
studentListView.setCellFactory(listView -> new PersonListViewCell());
personListView.setItems(personList);
personListView.setCellFactory(listView -> new PersonListViewCell());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
-fx-text-fill: white;
}

#filterField, #studentListPanel, #studentWebpage {
#filterField, #personListPanel, #personWebpage {
-fx-effect: innershadow(gaussian, black, 10, 0, 0, 0);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?import javafx.scene.layout.VBox?>

<fx:root type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
title="Address App" minWidth="450" minHeight="600" onCloseRequest="#handleExit">
title="NewAddressBook" minWidth="450" minHeight="600" onCloseRequest="#handleExit">
<icons>
<Image url="@/images/address_book_32.png" />
</icons>
Expand Down Expand Up @@ -47,11 +47,11 @@
</padding>
</StackPane>

<VBox fx:id="studentList" styleClass="pane-with-border" minWidth="340" prefWidth="340" VBox.vgrow="ALWAYS">
<VBox fx:id="personList" styleClass="pane-with-border" minWidth="340" prefWidth="340" VBox.vgrow="ALWAYS">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="studentListPanelPlaceholder" VBox.vgrow="ALWAYS"/>
<StackPane fx:id="personListPanelPlaceholder" VBox.vgrow="ALWAYS"/>
</VBox>

<StackPane fx:id="statusbarPlaceholder" VBox.vgrow="NEVER" />
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/PersonListPanel.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<?import javafx.scene.layout.VBox?>

<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<ListView fx:id="studentListView" VBox.vgrow="ALWAYS" />
<ListView fx:id="personListView" VBox.vgrow="ALWAYS" />
</VBox>
10 changes: 5 additions & 5 deletions src/main/resources/view/StudentListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="150.0" />
</columnConstraints>
<VBox alignment="CENTER_LEFT" minHeight="105" prefHeight="129.0" prefWidth="230.0" GridPane.columnIndex="0">
<VBox alignment="CENTER_LEFT" minHeight="105" prefHeight="146.0" prefWidth="150.0" GridPane.columnIndex="0" GridPane.vgrow="ALWAYS">
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
</padding>
Expand All @@ -29,10 +29,10 @@
</Label>
<Label fx:id="name" styleClass="cell_big_label" text="\$first" />
</HBox>
<HBox prefHeight="0.0" prefWidth="130.0">
<HBox>
<children>
<Label fx:id="formClass" styleClass="cell_small_label" text="\$formClass" />
<Label fx:id="involvement" styleClass="cell_small_label" text="\$involvement">
<Label fx:id="formClass" minWidth="-Infinity" styleClass="cell_small_label" text="\$formClass" />
<Label fx:id="involvement" minWidth="-Infinity" styleClass="cell_small_label" text="\$involvement">
<HBox.margin>
<Insets left="4.0" />
</HBox.margin></Label>
Expand All @@ -48,7 +48,7 @@
<Label fx:id="gender" styleClass="cell_small_label" text="\$gender" />
<Label fx:id="emergencyContact" styleClass="cell_small_label" text="\$emergencyContact" />
</VBox>
<VBox alignment="CENTER_LEFT" minHeight="0.0" prefHeight="117.0" prefWidth="260.0" GridPane.columnIndex="1">
<VBox alignment="CENTER_LEFT" minHeight="105.0" prefHeight="146.0" prefWidth="150.0" GridPane.columnIndex="1">
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
</padding>
Expand Down

0 comments on commit f98d9d2

Please sign in to comment.