Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY2021S1#75 from khor-jingqian/change-d…
Browse files Browse the repository at this point in the history
…esign

Change layout and enable assertions in gradle file
  • Loading branch information
nicholasyeo authored Oct 20, 2020
2 parents 5275d7d + aebdf38 commit 6c68a23
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 12 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ shadowJar {
archiveName = 'addressbook.jar'
}

run {
enableAssertions = true
}

defaultTasks 'clean', 'test'
7 changes: 7 additions & 0 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TextInputControl;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import seedu.address.commons.core.GuiSettings;
import seedu.address.commons.core.LogsCenter;
Expand Down Expand Up @@ -140,6 +145,8 @@ void fillInnerParts() {
CommandBox commandBox = new CommandBox(this::executeCommand);
commandBoxPlaceholder.getChildren().add(commandBox.getRoot());

routineListPanelPlaceholder.setBackground(new Background(new BackgroundFill(Color.YELLOW, CornerRadii.EMPTY,
Insets.EMPTY)));
routineListPanel = new RoutineListPanel(logic.getFilteredRoutineList());
routineListPanelPlaceholder.getChildren().add(routineListPanel.getRoot());
}
Expand Down
34 changes: 34 additions & 0 deletions src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
-fx-border-width: 1;
}

.list-cell:filled:selected #routineCardPane {
-fx-border-color: #4b7b91;
-fx-border-width: 1;
}

.list-cell .label {
-fx-text-fill: white;
}
Expand Down Expand Up @@ -312,6 +317,35 @@
-fx-border-width: 0;
}

#routineCardPane {
-fx-background-color: transparent;
-fx-border-width: 0;
}

#timetable {
-fx-background-color: #FFF000;
}

#calories {
-fx-background-color: #000FFF;
}

#sideBox {
-fx-background-color: #FF7F50;
}

#bmi {
-fx-background-color: #ADD8E6;
}

#logo {
-fx-background-color: #FFF123;
}

#routineListPanel {
-fx-background-color: #FFFFFF;
}

#commandTypeLabel {
-fx-font-size: 11px;
-fx-text-fill: #F70D1A;
Expand Down
43 changes: 33 additions & 10 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,31 @@
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</Menu>
</MenuBar>
<HBox prefHeight="200" prefWidth="250" id="timetable">

<StackPane fx:id="commandBoxPlaceholder" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>
</HBox>

<HBox>
<children>
<HBox prefHeight="200" prefWidth="610" id="calories">

</HBox>
<VBox prefHeight="200" prefWidth="610">
<HBox prefHeight="100" prefWidth="610" id="sideBox">

</HBox>
<HBox prefHeight="100" prefWidth="610">
<VBox prefHeight="100" prefWidth="305" id="bmi">

</VBox>
<VBox prefHeight="100" prefWidth="305" id = "logo" >

</VBox>
</HBox>
</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 prefHeight="350.0" prefWidth="200.0">
<children>

Expand Down Expand Up @@ -72,6 +85,16 @@
</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>
<StackPane fx:id="commandBoxPlaceholder" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>

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

<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<HBox id="routineCardPane" fx:id="routineCardPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/RoutineListPanel.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.VBox?>

<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<VBox id="routineListPanel" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<ListView fx:id="routineListView" VBox.vgrow="ALWAYS" />
</VBox>

0 comments on commit 6c68a23

Please sign in to comment.