Skip to content

Commit

Permalink
fix: update UI css: Liberry Theme
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyao821 committed Nov 3, 2019
1 parent be367ef commit 25457c5
Show file tree
Hide file tree
Showing 10 changed files with 337 additions and 39 deletions.
5 changes: 2 additions & 3 deletions src/main/java/seedu/address/logic/commands/SetCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ public class SetCommand extends ReversibleCommand {

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Sets custom user settings of the application. \n"
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) \n"
+ "[" + PREFIX_LOAN_PERIOD + "LOAN_PERIOD] "
+ "[" + PREFIX_RENEW_PERIOD + "RENEW_PERIOD]\n"
+ "[" + PREFIX_FINE_INCREMENT + "FINE_INCREMENT]\n"
+ "[" + PREFIX_RENEW_PERIOD + "RENEW_PERIOD] "
+ "[" + PREFIX_FINE_INCREMENT + "FINE_INCREMENT] "
+ "[" + PREFIX_MAX_RENEWS + "MAX_RENEWS]\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_LOAN_PERIOD + "14 "
Expand Down
1 change: 0 additions & 1 deletion src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public MainWindow(Stage primaryStage, Logic logic) {
} else {
mode.setText(NORMAL_MODE);
}
resultDisplayPlaceholder.setStyle("-fx-background-color: #2b2b2b#2b2b2b");
}

public Stage getPrimaryStage() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/UiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void showAlertDialogAndWait(Alert.AlertType type, String title, String headerTex
private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,
String contentText) {
final Alert alert = new Alert(type);
alert.getDialogPane().getStylesheets().add("view/DarkTheme.css");
alert.getDialogPane().getStylesheets().add("view/LiBerryTheme.css");
alert.initOwner(owner);
alert.setTitle(title);
alert.setHeaderText(headerText);
Expand Down
42 changes: 28 additions & 14 deletions src/main/resources/view/BookListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,53 @@
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>

<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/11.0.0" xmlns:fx="http://javafx.com/fxml/1">
<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="Infinity" minWidth="10.0" prefWidth="205.0" />
</columnConstraints>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0" GridPane.hgrow="ALWAYS">
<VBox alignment="CENTER_LEFT" minHeight="80" GridPane.columnIndex="0" GridPane.hgrow="ALWAYS">
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
</padding>
<HBox alignment="CENTER_LEFT" spacing="5">
<HBox alignment="CENTER_LEFT" spacing="5.0">
<Label fx:id="id" styleClass="cell_big_label">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
<Label fx:id="title" styleClass="cell_big_label" text="\$first" />
<Pane HBox.hgrow="ALWAYS" />
<Label fx:id="serialNumber" alignment="CENTER_RIGHT" styleClass="cell_big_label" text="\$serialNumber">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
<HBox.margin>
<Insets right="30.0" />
</HBox.margin>
</Label>
</HBox>
<FlowPane fx:id="genres" />
<Label fx:id="serialNumber" styleClass="cell_small_label" text="\$serialNumber" />
<Label fx:id="author" styleClass="cell_small_label" text="\$author" />
<Label fx:id="author" styleClass="cell_small_label" text="\$author">
<VBox.margin>
<Insets bottom="1.0" />
</VBox.margin></Label>
<FlowPane fx:id="genres">
<VBox.margin>
<Insets bottom="2.0" top="2.0" />
</VBox.margin></FlowPane>
</VBox>
<rowConstraints>
<RowConstraints />
</rowConstraints>
</GridPane>
<Pane maxWidth="100.0" minHeight="105.0" minWidth="120.0" prefHeight="105.0" prefWidth="120.0">
<children>
<Label fx:id="loanStatus" layoutY="41.0" text="" />
<Label fx:id="dueDate" layoutY="62.0" text="" styleClass="cell_small_label" />
<Label fx:id="renewCount" layoutY="78.0" text="" styleClass="cell_small_label" />
</children>
</Pane>
<VBox minHeight="70.0" minWidth="120.0" prefHeight="70.0" prefWidth="150.0">
<Pane VBox.vgrow="ALWAYS" />
<Label fx:id="loanStatus" text="" />
<Label fx:id="dueDate" styleClass="cell_small_label" text="" />
<Label fx:id="renewCount" styleClass="cell_small_label" text="" />
<Pane VBox.vgrow="ALWAYS" />
</VBox>
</HBox>
2 changes: 1 addition & 1 deletion src/main/resources/view/BookListPanel.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/11.0.0" xmlns:fx="http://javafx.com/fxml/1">
<ListView fx:id="bookListView" VBox.vgrow="ALWAYS" />
<ListView fx:id="bookListView" styleClass="listing-panel" VBox.vgrow="ALWAYS" />
</VBox>
16 changes: 10 additions & 6 deletions src/main/resources/view/BorrowerPanel.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.VBox?>

<VBox fx:id="borrowerPanel" prefWidth="500.0" minWidth="500" maxWidth="500" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Label fx:id="name" prefHeight="60.0" styleClass="result-display" text="Borrower: ">
<?import javafx.scene.layout.Pane?>
<VBox fx:id="borrowerPanel" prefHeight="100.0" prefWidth="500.0" minWidth="500" maxWidth="500"
xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<VBox prefHeight="120.0">
<Label fx:id="name" prefHeight="20.0" styleClass="borrower-particulars-bold" text="Borrower:">
<padding>
<Insets left="20.0" />
<Insets left="20.0" top="10.0"/>
</padding>
</Label>
<Label fx:id="id" prefHeight="60.0" styleClass="result-display" text="ID:">
<Label fx:id="id" prefHeight="20.0" styleClass="borrower-particulars" text="ID:">
<padding>
<Insets left="20.0" />
</padding>
</Label>
<Label fx:id="fines" prefHeight="60.0" styleClass="result-display" text="ID:">
<Label fx:id="fines" prefHeight="20.0" styleClass="borrower-particulars" text="Fines:">
<padding>
<Insets left="20.0" />
</padding>
</Label>
<ListView fx:id="bookListView" VBox.vgrow="ALWAYS" />
</VBox>
<ListView fx:id="bookListView" styleClass="listing-panel" VBox.vgrow="ALWAYS" />
</VBox>
2 changes: 1 addition & 1 deletion src/main/resources/view/CommandBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

<TextField fx:id="commandTextField" maxHeight="35.0" maxWidth="Infinity" minHeight="35.0" minWidth="0.0"
onAction="#handleCommandEntered" prefHeight="35.0" prefWidth="600.0" promptText="Enter command here..."
AnchorPane.leftAnchor="5" AnchorPane.rightAnchor="5" xmlns="http://javafx.com/javafx/11.0.0"
AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="5" xmlns="http://javafx.com/javafx/11.0.0"
xmlns:fx="http://javafx.com/fxml/1" />
Loading

0 comments on commit 25457c5

Please sign in to comment.