Skip to content

Commit

Permalink
Updated GUI to the UI concept design (#55)
Browse files Browse the repository at this point in the history
* Updated GUI to the UI concept

add: Used Icons from docs to create 32x32 pixels icons for Application usage in resources folder
chore: Moved UI elements to follow UI design
chore: Added Send button for mouse click
chore: Added Title labels for main Appointment and Patient addressbook
chore: Updated App Icon with product icon and added Icon to menu bar

* Replaced Squished Icons with 1:1 aspect ratio

fix: Replaced badly cropped icons with proper 1:1 icons with help from @Q-gabe
  • Loading branch information
gachia authored Oct 16, 2019
1 parent a6186fc commit 0d2c483
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/commons/core/GuiSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class GuiSettings implements Serializable {

private static final double DEFAULT_HEIGHT = 600;
private static final double DEFAULT_WIDTH = 740;
private static final double DEFAULT_WIDTH = 700;

private final double windowWidth;
private final double windowHeight;
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 @@ -20,7 +20,7 @@ public class UiManager implements Ui {
public static final String ALERT_DIALOG_PANE_FIELD_ID = "alertDialogPane";

private static final Logger logger = LogsCenter.getLogger(UiManager.class);
private static final String ICON_APPLICATION = "/images/address_book_32.png";
private static final String ICON_APPLICATION = "/images/visitWindowIcon.png";

private Logic logic;
private MainWindow mainWindow;
Expand Down
Binary file added src/main/resources/images/visitInAppIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/images/visitWindowIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src/main/resources/view/CommandBox.fxml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?>

<StackPane styleClass="stack-pane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<TextField fx:id="commandTextField" onAction="#handleCommandEntered" promptText="Enter command here..."/>
<StackPane styleClass="stack-pane" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<TextField fx:id="commandTextField" onAction="#handleCommandEntered" prefHeight="25.0" prefWidth="205.0" promptText="How may I help you?">
<font>
<Font name="Gill Sans MT Italic" size="13.0" />
</font></TextField>
<Button mnemonicParsing="false" onMouseClicked="#handleCommandEntered" text="Send" StackPane.alignment="CENTER_RIGHT" />
</StackPane>

4 changes: 3 additions & 1 deletion src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
}

.label-header {
-fx-font-size: 32pt;
-fx-font-size: 16pt;
-fx-font-family: "Segoe UI Light";
-fx-text-fill: white;
-fx-opacity: 1;
-fx-background-color: derive(#1d1d1d, 20%);
-fx-border-color: derive(#1d1d1d, 10%);
}

.text-field {
Expand Down
54 changes: 47 additions & 7 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.Scene?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.stage.Stage?>
Expand All @@ -24,20 +30,51 @@

<VBox>
<MenuBar fx:id="menuBar" VBox.vgrow="NEVER">
<Menu mnemonicParsing="false">
<graphic>
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" smooth="false">
<image>
<Image url="@../images/visitInAppIcon.png" />
</image>
</ImageView>
</graphic>
</Menu>
<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>

<VBox fx:id="personList" minWidth="340" prefWidth="340" styleClass="pane-with-border" VBox.vgrow="ALWAYS">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<StackPane fx:id="personListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</VBox>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="200.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="241.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="200.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<VBox fx:id="personList" styleClass="pane-with-border" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.rowSpan="2">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<StackPane fx:id="personListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</VBox>
<VBox prefWidth="466.0" styleClass="pane-with-border" GridPane.rowIndex="1" GridPane.rowSpan="2" />
<Label maxWidth="1.7976931348623157E308" styleClass="label-header" text="Patients" GridPane.columnIndex="1">
<padding>
<Insets left="10.0" />
</padding></Label>
<Label maxWidth="1.7976931348623157E308" styleClass="label-header" text="Appointments">
<padding>
<Insets left="10.0" />
</padding>
</Label>
</children>
</GridPane>

<StackPane fx:id="resultDisplayPlaceholder" maxHeight="100" minHeight="100" prefHeight="100" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
Expand All @@ -49,6 +86,9 @@
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
<children>
<Button mnemonicParsing="false" text="Send" translateX="105.0" />
</children>
</StackPane>
</VBox>
</Scene>
Expand Down

0 comments on commit 0d2c483

Please sign in to comment.