From 2e03b229b31e09c85ca90a151452eca25657a3a0 Mon Sep 17 00:00:00 2001 From: shaoyi1997 Date: Sun, 20 Oct 2019 14:40:30 +0800 Subject: [PATCH 01/18] add fridgeId to GUI, some GUI enhancements --- src/main/java/seedu/address/MainApp.java | 3 + .../logic/parser/AddCommandParser.java | 7 +- .../java/seedu/address/ui/BodyTableView.java | 121 +++++++++++++++--- .../java/seedu/address/ui/FridgeIdLabel.java | 53 ++++++++ .../resources/view/BodyMasterDetailPane.fxml | 2 +- src/main/resources/view/BodyTableView.fxml | 6 +- src/main/resources/view/DarkTheme.css | 34 +++-- src/main/resources/view/FridgeIdLabel.fxml | 18 +++ src/main/resources/view/MainWindow.fxml | 8 +- 9 files changed, 211 insertions(+), 41 deletions(-) create mode 100644 src/main/java/seedu/address/ui/FridgeIdLabel.java create mode 100644 src/main/resources/view/FridgeIdLabel.fxml diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java index e5cfb161b73..e7a44a4b3ee 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/address/MainApp.java @@ -6,6 +6,7 @@ import java.util.logging.Logger; import javafx.application.Application; +import javafx.application.Platform; import javafx.stage.Stage; import seedu.address.commons.core.Config; import seedu.address.commons.core.LogsCenter; @@ -179,5 +180,7 @@ public void stop() { } catch (IOException e) { logger.severe("Failed to save preferences " + StringUtil.getDetails(e)); } + Platform.exit(); + System.exit(0); } } diff --git a/src/main/java/seedu/address/logic/parser/AddCommandParser.java b/src/main/java/seedu/address/logic/parser/AddCommandParser.java index 5e73eb7f91f..74bb4daa496 100644 --- a/src/main/java/seedu/address/logic/parser/AddCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/AddCommandParser.java @@ -153,6 +153,10 @@ private static Body parseFieldsBody(ArgumentMultimap argMultimap) throws ParseEx String details = ParserUtil.parseStringFields(argMultimap.getValue(PREFIX_BODY_DETAILS).orElse("")); List organsForDonation = ParserUtil.parseOrgansForDonation( argMultimap.getValue(PREFIX_ORGANS_FOR_DONATION).orElse("")); + Religion religion = ParserUtil.parseReligion(argMultimap.getValue(PREFIX_RELIGION).orElse("")); + String relationship = ParserUtil.parseStringFields(argMultimap.getValue(PREFIX_RELATIONSHIP) + .orElse("")); + IdentificationNumber fridgeId = ParserUtil.parseIdentificationNumber( argMultimap.getValue(PREFIX_FRIDGE_ID).orElse("")); if (fridgeId != null) { @@ -163,9 +167,6 @@ private static Body parseFieldsBody(ArgumentMultimap argMultimap) throws ParseEx throw new ParseException(MESSAGE_INEXISTENT_FRIDGE); } } - Religion religion = ParserUtil.parseReligion(argMultimap.getValue(PREFIX_RELIGION).orElse("")); - String relationship = ParserUtil.parseStringFields(argMultimap.getValue(PREFIX_RELATIONSHIP) - .orElse("")); return new Body(false, 1, dateOfAdmission, name, sex, nric, religion, causeOfDeath, organsForDonation, status, fridgeId, dateOfBirth, dateOfDeath, nameNok, relationship, diff --git a/src/main/java/seedu/address/ui/BodyTableView.java b/src/main/java/seedu/address/ui/BodyTableView.java index d4988c93fc0..df47ae2d8ff 100644 --- a/src/main/java/seedu/address/ui/BodyTableView.java +++ b/src/main/java/seedu/address/ui/BodyTableView.java @@ -12,12 +12,16 @@ import javafx.beans.value.ObservableValue; import javafx.collections.ObservableList; import javafx.fxml.FXML; +import javafx.geometry.Pos; import javafx.scene.control.Label; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; -import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.layout.Region; +import javafx.scene.layout.StackPane; +import javafx.scene.paint.Color; +import javafx.scene.text.Text; +import javafx.util.Callback; import seedu.address.commons.core.LogsCenter; import seedu.address.model.entity.IdentificationNumber; import seedu.address.model.entity.body.Body; @@ -29,6 +33,12 @@ public class BodyTableView extends UiPart { private static final String FXML = "BodyTableView.fxml"; + private static final double COLUMN_WIDTH_FRIDGE_ID = 0.1; + private static final double COLUMN_WIDTH_NAME = 0.225; + private static final double COLUMN_WIDTH_ID = 0.15; + private static final double COLUMN_WIDTH_DATE_OF_ADMISSION = 0.25; + private static final double COLUMN_WIDTH_BODY_STATUS = 0.275; + private final Logger logger = LogsCenter.getLogger(BodyTableView.class); @FXML @@ -37,11 +47,14 @@ public class BodyTableView extends UiPart { public BodyTableView (ObservableList bodyList, ObservableValue selectedBody, Consumer onSelectedBodyChange) { super(FXML); - setColumns(); + setupColumns(); bodyTableView.setItems(bodyList); + setCellSelectionHandler(selectedBody, onSelectedBodyChange); + } - //@@ shaoyi1997-reused - //Reused from SE-EDU Address Book Level 4 + //@@ shaoyi1997-reused + //Reused from SE-EDU Address Book Level 4 + private void setCellSelectionHandler(ObservableValue selectedBody, Consumer onSelectedBodyChange) { bodyTableView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { logger.fine("Selection in body table view changed to : '" + newValue + "'"); onSelectedBodyChange.accept(newValue); @@ -63,30 +76,101 @@ public BodyTableView (ObservableList bodyList, ObservableValue selec bodyTableView.getSelectionModel().clearAndSelect(index); } }); - //@@author shaoyi1997 + } + //@@author shaoyi1997 + + private void setupColumns() { + TableColumn fridgeId = setupFridgeIdColumn(); + TableColumn name = setupNameColumn(); + TableColumn id = setupBodyIdColumn(); + TableColumn dateOfAdmission = setupDateOfAdmissionColumn(); + TableColumn bodyStatus = setupBodyStatusColumn(); + bodyTableView.getColumns().addAll(fridgeId, name, id, dateOfAdmission, bodyStatus); + } + + private TableColumn setupFridgeIdColumn() { + TableColumn fridgeId = new TableColumn<>("Fridge ID"); + fridgeId.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getFridgeId().orElse(null))); + fridgeId.setCellFactory(tableColumn -> new FridgeIdTableCell()); + fridgeId.prefWidthProperty().bind(bodyTableView.widthProperty().multiply(COLUMN_WIDTH_FRIDGE_ID)); + return fridgeId; } - private void setColumns() { - TableColumn name = new TableColumn<>("Name"); - name.setCellValueFactory(new PropertyValueFactory("Name")); - name.setSortType(TableColumn.SortType.ASCENDING); + private TableColumn setupNameColumn() { + return setupStringColumn("Name", COLUMN_WIDTH_NAME, + param -> new ReadOnlyObjectWrapper<>(param.getValue().getName().toString())); + } - TableColumn id = new TableColumn<>("Body ID"); - id.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getIdNum())); + private TableColumn setupBodyIdColumn() { + return setupStringColumn("Body ID", COLUMN_WIDTH_ID, + param -> new ReadOnlyObjectWrapper<>(param.getValue().getIdNum().toString())); + } - TableColumn dateOfAdmission = new TableColumn<>("Date Of Admission"); - dateOfAdmission.setCellValueFactory(new PropertyValueFactory("dateOfAdmission")); + private TableColumn setupDateOfAdmissionColumn() { + return setupStringColumn("Date of Admission", COLUMN_WIDTH_DATE_OF_ADMISSION, + param -> new ReadOnlyObjectWrapper<>(param.getValue().getDateOfAdmission().toString())); + } + private TableColumn setupBodyStatusColumn() { TableColumn bodyStatus = new TableColumn<>("Body Status"); bodyStatus.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getBodyStatus().get())); bodyStatus.setCellFactory(tableColumn -> new BodyStatusTableCell()); - bodyStatus.setStyle("-justify-self: center"); + bodyStatus.prefWidthProperty().bind(bodyTableView.widthProperty().multiply(COLUMN_WIDTH_BODY_STATUS)); + return bodyStatus; + } + + private TableColumn setupStringColumn(String nameOfColumn, double columnWidth, + Callback, ObservableValue> value) { + TableColumn col = new TableColumn<>(nameOfColumn); + col.prefWidthProperty().bind(bodyTableView.widthProperty() + .multiply(columnWidth)); + col.setCellValueFactory(value); + col.setCellFactory(tablecell -> new TableCellForStrings()); + return col; + } + + /** + * Custom {@code TableCell} that displays and vertically centralizes strings in the cell. + */ + class TableCellForStrings extends TableCell { + @Override + protected void updateItem(String str, boolean empty) { + super.updateItem(str, empty); - bodyTableView.getColumns().addAll(name, id, dateOfAdmission, bodyStatus); + if (empty | str == null) { + setGraphic(null); + setText(null); + } else { + StackPane pane = new StackPane(); + Text text = new Text(str); + text.setFill(Color.WHITE); + text.wrappingWidthProperty().bind(widthProperty()); + text.textProperty().bind(itemProperty()); + pane.getChildren().add(text); + setGraphic(pane); + } + } + } + + /** + * Custom {@code TableCell} that displays the {@code fridgeId} of a {@code Body}. + */ + class FridgeIdTableCell extends TableCell { + @Override + protected void updateItem(IdentificationNumber id, boolean empty) { + super.updateItem(id, empty); + + if (empty) { + setGraphic(null); + setText(null); + } else { + setGraphic(new FridgeIdLabel(id).getRoot()); + } + } } /** - * Custom {@code TableCell} that displays the graphics of a {@code Body}. + * Custom {@code TableCell} that displays the {@code bodyStatus} of a {@code Body}. */ class BodyStatusTableCell extends TableCell { @Override @@ -109,7 +193,10 @@ protected void updateItem(BodyStatus bodyStatus, boolean empty) { } else { label.getStyleClass().add("bodyStatusLabelPending"); } - setGraphic(label); + StackPane pane = new StackPane(); + pane.getChildren().add(label); + pane.setAlignment(Pos.CENTER_LEFT); + setGraphic(pane); } } } diff --git a/src/main/java/seedu/address/ui/FridgeIdLabel.java b/src/main/java/seedu/address/ui/FridgeIdLabel.java new file mode 100644 index 00000000000..771f6cec286 --- /dev/null +++ b/src/main/java/seedu/address/ui/FridgeIdLabel.java @@ -0,0 +1,53 @@ +package seedu.address.ui; + +import javafx.fxml.FXML; +import javafx.scene.control.Label; +import javafx.scene.layout.Region; +import javafx.scene.paint.Color; +import javafx.scene.shape.Circle; +import seedu.address.model.entity.IdentificationNumber; + +/** + * An UI component that displays information of a {@code fridgeId}. + */ +public class FridgeIdLabel extends UiPart { + + private static final String FXML = "FridgeIdLabel.fxml"; + + public final IdentificationNumber fridgeId; + + @FXML + private Circle circle; + @FXML + private Label fridgeIdPlaceholder; + + public FridgeIdLabel(IdentificationNumber id) { + super(FXML); + this.fridgeId = id; + if (id == null) { + fridgeIdPlaceholder.setText("NA"); + circle.getStyleClass().add("fridgeIdCircleEmpty"); + } else { + fridgeIdPlaceholder.setText(id.toString()); + circle.getStyleClass().add("fridgeIdCircleFilled"); + } + circle.radiusProperty().bind(fridgeIdPlaceholder.widthProperty()); + } + + @Override + public boolean equals(Object other) { + // short circuit if same object + if (other == this) { + return true; + } + + // instanceof handles nulls + if (!(other instanceof PersonCard)) { + return false; + } + + // state check + FridgeIdLabel label = (FridgeIdLabel) other; + return fridgeIdPlaceholder.getText().equals(label.fridgeIdPlaceholder.getText()); + } +} diff --git a/src/main/resources/view/BodyMasterDetailPane.fxml b/src/main/resources/view/BodyMasterDetailPane.fxml index 5a78aa59920..342cb1f7317 100644 --- a/src/main/resources/view/BodyMasterDetailPane.fxml +++ b/src/main/resources/view/BodyMasterDetailPane.fxml @@ -3,4 +3,4 @@ - + diff --git a/src/main/resources/view/BodyTableView.fxml b/src/main/resources/view/BodyTableView.fxml index c70fd29cea3..f0ade37b49c 100644 --- a/src/main/resources/view/BodyTableView.fxml +++ b/src/main/resources/view/BodyTableView.fxml @@ -2,8 +2,4 @@ - - - - - + diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index 0f2667b134e..3dcd5a822ae 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -39,6 +39,10 @@ -fx-max-height: 0; } +.table-row-cell { + -fx-cell-size: 40px; +} + .table-view { -fx-base: #1d1d1d; -fx-control-inner-background: #1d1d1d; @@ -48,20 +52,15 @@ -fx-padding: 5; } -.table-view .column-header-background { - -fx-background-color: #4d4d4d; +.table-view .scroll-bar { + -fx-background-color: #1d1d1d; } .table-view .column-header, .table-view .filler { - -fx-size: 20; - -fx-border-width: 0 0 1 0; - -fx-background-color: transparent; - -fx-border-color: - transparent - transparent - derive(-fx-base, 80%) - transparent; - -fx-border-insets: 0 10 1 0; + -fx-size: 16; + -fx-border-width: 0 0 0 0; + -fx-background-color: #1d1d1d; + -fx-border-insets: 0 0 0 0; } .table-view .column-header .label { @@ -70,6 +69,7 @@ -fx-text-fill: white; -fx-alignment: center-left; -fx-opacity: 1; + -fx-background-color: #1d1d1d; } .table-view:focused .table-row-cell:filled:focused:selected { @@ -391,6 +391,13 @@ -fx-alignment: center; } +.fridgeIdCircleEmpty { + -fx-fill: #EA4335; +} + +.fridgeIdCircleFilled { + -fx-fill: #4285F4; +} .chart { -fx-padding: 10px; @@ -435,3 +442,8 @@ -fx-stroke: #2B3941; -fx-stroke-width: 0; } + +#fridgeIdPlaceholder { + -fx-text-fill: white; + -fx-font-size: 10; +} \ No newline at end of file diff --git a/src/main/resources/view/FridgeIdLabel.fxml b/src/main/resources/view/FridgeIdLabel.fxml new file mode 100644 index 00000000000..3e817a0ad88 --- /dev/null +++ b/src/main/resources/view/FridgeIdLabel.fxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 97c0d9e9264..2f8ec56cecc 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -12,7 +12,7 @@ - + @@ -46,20 +46,20 @@ - + - + - + From dd2fb4dca8503622e2638a0036914aef9ef4a112 Mon Sep 17 00:00:00 2001 From: shaoyi1997 Date: Sun, 20 Oct 2019 17:10:42 +0800 Subject: [PATCH 02/18] change color scheme of the app --- .../java/seedu/address/ui/BodyTableView.java | 2 +- src/main/resources/view/BodyTableView.fxml | 3 +- src/main/resources/view/DarkTheme.css | 70 ++++++++++--------- src/main/resources/view/MainWindow.fxml | 19 +++-- 4 files changed, 55 insertions(+), 39 deletions(-) diff --git a/src/main/java/seedu/address/ui/BodyTableView.java b/src/main/java/seedu/address/ui/BodyTableView.java index df47ae2d8ff..4778f99120a 100644 --- a/src/main/java/seedu/address/ui/BodyTableView.java +++ b/src/main/java/seedu/address/ui/BodyTableView.java @@ -37,7 +37,7 @@ public class BodyTableView extends UiPart { private static final double COLUMN_WIDTH_NAME = 0.225; private static final double COLUMN_WIDTH_ID = 0.15; private static final double COLUMN_WIDTH_DATE_OF_ADMISSION = 0.25; - private static final double COLUMN_WIDTH_BODY_STATUS = 0.275; + private static final double COLUMN_WIDTH_BODY_STATUS = 0.26; private final Logger logger = LogsCenter.getLogger(BodyTableView.class); diff --git a/src/main/resources/view/BodyTableView.fxml b/src/main/resources/view/BodyTableView.fxml index f0ade37b49c..e3875f3078a 100644 --- a/src/main/resources/view/BodyTableView.fxml +++ b/src/main/resources/view/BodyTableView.fxml @@ -2,4 +2,5 @@ - + + diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index 3dcd5a822ae..fd7a334bb10 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -1,5 +1,9 @@ +.root { + -fx-background-color: #192039; +} + .background { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #192039; background-color: #383838; /* Used in the default.html file */ } @@ -44,32 +48,34 @@ } .table-view { - -fx-base: #1d1d1d; - -fx-control-inner-background: #1d1d1d; - -fx-background-color: #1d1d1d; + -fx-base: #161d33; + -fx-control-inner-background: #161d33; + -fx-background-color: #161d33; -fx-table-cell-border-color: transparent; -fx-table-header-border-color: transparent; -fx-padding: 5; + -fx-border-width: 10; + -fx-background-insets: 10 10 10 10; } .table-view .scroll-bar { - -fx-background-color: #1d1d1d; + -fx-background-color: #161d33; } .table-view .column-header, .table-view .filler { -fx-size: 16; -fx-border-width: 0 0 0 0; - -fx-background-color: #1d1d1d; + -fx-background-color: #161d33; -fx-border-insets: 0 0 0 0; } .table-view .column-header .label { - -fx-font-size: 12pt; - -fx-font-family: "Segoe UI Light"; + -fx-font-size: 10pt; + -fx-font-family: "Palatino Linotype"; -fx-text-fill: white; -fx-alignment: center-left; -fx-opacity: 1; - -fx-background-color: #1d1d1d; + -fx-background-color: #161d33; } .table-view:focused .table-row-cell:filled:focused:selected { @@ -77,20 +83,20 @@ } .split-pane:horizontal .split-pane-divider { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #161d33; -fx-border-color: transparent transparent transparent #4d4d4d; } .split-pane { -fx-border-radius: 1; -fx-border-width: 1; - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #161d33; } .list-view { -fx-background-insets: 0; -fx-padding: 0; - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #161d33; } .list-cell { @@ -133,17 +139,17 @@ } .stack-pane { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #161d33; } .pane-with-border { - -fx-background-color: derive(#1d1d1d, 20%); - -fx-border-color: derive(#1d1d1d, 10%); + -fx-background-color: #161d33; + -fx-border-color: #192039; -fx-border-top-width: 1px; } .status-bar { - -fx-background-color: derive(#1d1d1d, 30%); + -fx-background-color: #192039; } .result-display { @@ -165,8 +171,8 @@ } .status-bar-with-border { - -fx-background-color: derive(#1d1d1d, 30%); - -fx-border-color: derive(#1d1d1d, 25%); + -fx-background-color: #192039; + -fx-border-color: #192039; -fx-border-width: 1px; } @@ -175,17 +181,17 @@ } .grid-pane { - -fx-background-color: derive(#1d1d1d, 30%); - -fx-border-color: derive(#1d1d1d, 30%); + -fx-background-color: #192039; + -fx-border-color: #192039; -fx-border-width: 1px; } .grid-pane .stack-pane { - -fx-background-color: derive(#1d1d1d, 30%); + -fx-background-color: #192039; } .context-menu { - -fx-background-color: derive(#1d1d1d, 50%); + -fx-background-color: #192039; } .context-menu .label { @@ -193,7 +199,7 @@ } .menu-bar { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #161d33; } .menu-bar .label { @@ -217,7 +223,7 @@ -fx-border-color: #e2e2e2; -fx-border-width: 2; -fx-background-radius: 0; - -fx-background-color: #1d1d1d; + -fx-background-color: #192039; -fx-font-family: "Segoe UI", Helvetica, Arial, sans-serif; -fx-font-size: 11pt; -fx-text-fill: #d8d8d8; @@ -230,7 +236,7 @@ .button:pressed, .button:default:hover:pressed { -fx-background-color: white; - -fx-text-fill: #1d1d1d; + -fx-text-fill: #192039; } .button:focused { @@ -243,7 +249,7 @@ .button:disabled, .button:default:disabled { -fx-opacity: 0.4; - -fx-background-color: #1d1d1d; + -fx-background-color: #192039; -fx-text-fill: white; } @@ -257,11 +263,11 @@ } .dialog-pane { - -fx-background-color: #1d1d1d; + -fx-background-color: #192039; } .dialog-pane > *.button-bar > *.container { - -fx-background-color: #1d1d1d; + -fx-background-color: #192039; } .dialog-pane > *.label.content { @@ -271,7 +277,7 @@ } .dialog-pane:header *.header-panel { - -fx-background-color: derive(#1d1d1d, 25%); + -fx-background-color: derive(#192039, 25%); } .dialog-pane:header *.header-panel *.label { @@ -282,11 +288,11 @@ } .scroll-bar { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: #192039; } .scroll-bar .thumb { - -fx-background-color: derive(#1d1d1d, 50%); + -fx-background-color: #192039; -fx-background-insets: 3; } @@ -308,7 +314,7 @@ } #cardPane { - -fx-background-color: transparent; + -fx-background-color: #161d33; -fx-border-width: 0; } diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 2f8ec56cecc..5c32c336868 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -17,7 +17,7 @@ - + @@ -54,17 +54,26 @@ - + - + + + + - + - + + + + + + + From aab1ba557e248fa8e64b54b21b64660caf9d676b Mon Sep 17 00:00:00 2001 From: shaoyi1997 Date: Mon, 21 Oct 2019 08:56:00 +0800 Subject: [PATCH 03/18] major ui enhancement --- .../java/seedu/address/ui/FridgeIdLabel.java | 1 + src/main/resources/view/BodyListCard.fxml | 2 +- .../resources/view/BodyMasterDetailPane.fxml | 2 +- src/main/resources/view/DarkTheme.css | 88 +++++++++++-------- src/main/resources/view/MainWindow.fxml | 35 +++++--- src/main/resources/view/PersonListPanel.fxml | 2 +- src/main/resources/view/ResultDisplay.fxml | 9 +- src/main/resources/view/WorkerListCard.fxml | 2 +- 8 files changed, 81 insertions(+), 60 deletions(-) diff --git a/src/main/java/seedu/address/ui/FridgeIdLabel.java b/src/main/java/seedu/address/ui/FridgeIdLabel.java index 771f6cec286..e59a2a37354 100644 --- a/src/main/java/seedu/address/ui/FridgeIdLabel.java +++ b/src/main/java/seedu/address/ui/FridgeIdLabel.java @@ -31,6 +31,7 @@ public FridgeIdLabel(IdentificationNumber id) { fridgeIdPlaceholder.setText(id.toString()); circle.getStyleClass().add("fridgeIdCircleFilled"); } + circle.setStrokeWidth(0.0); circle.radiusProperty().bind(fridgeIdPlaceholder.widthProperty()); } diff --git a/src/main/resources/view/BodyListCard.fxml b/src/main/resources/view/BodyListCard.fxml index dae243ad225..0d5d74b3a61 100644 --- a/src/main/resources/view/BodyListCard.fxml +++ b/src/main/resources/view/BodyListCard.fxml @@ -9,7 +9,7 @@ - + diff --git a/src/main/resources/view/BodyMasterDetailPane.fxml b/src/main/resources/view/BodyMasterDetailPane.fxml index 342cb1f7317..ac854acadb2 100644 --- a/src/main/resources/view/BodyMasterDetailPane.fxml +++ b/src/main/resources/view/BodyMasterDetailPane.fxml @@ -3,4 +3,4 @@ - + diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index fd7a334bb10..e3f345b9faa 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -1,9 +1,9 @@ .root { - -fx-background-color: #192039; + -fx-background-color: #242935; } .background { - -fx-background-color: #192039; + -fx-background-color: #242935; background-color: #383838; /* Used in the default.html file */ } @@ -48,34 +48,33 @@ } .table-view { - -fx-base: #161d33; - -fx-control-inner-background: #161d33; - -fx-background-color: #161d33; + -fx-base: #2c3041; + -fx-control-inner-background: #2c3041; + -fx-background-color: #2c3041; -fx-table-cell-border-color: transparent; -fx-table-header-border-color: transparent; -fx-padding: 5; - -fx-border-width: 10; -fx-background-insets: 10 10 10 10; } .table-view .scroll-bar { - -fx-background-color: #161d33; + -fx-background-color: #2c3041; } .table-view .column-header, .table-view .filler { -fx-size: 16; -fx-border-width: 0 0 0 0; - -fx-background-color: #161d33; + -fx-background-color: #2c3041; -fx-border-insets: 0 0 0 0; } .table-view .column-header .label { -fx-font-size: 10pt; - -fx-font-family: "Palatino Linotype"; + -fx-font-family: "Century Gothic"; -fx-text-fill: white; -fx-alignment: center-left; -fx-opacity: 1; - -fx-background-color: #161d33; + -fx-background-color: #2c3041; } .table-view:focused .table-row-cell:filled:focused:selected { @@ -83,20 +82,24 @@ } .split-pane:horizontal .split-pane-divider { - -fx-background-color: #161d33; + -fx-background-color: #2c3041; -fx-border-color: transparent transparent transparent #4d4d4d; } .split-pane { -fx-border-radius: 1; -fx-border-width: 1; - -fx-background-color: #161d33; + -fx-background-color: #2c3041; } .list-view { -fx-background-insets: 0; -fx-padding: 0; - -fx-background-color: #161d33; + -fx-background-color: #2c3041; + -fx-border-radius: 5; + -fx-background-radius: 5; + -fx-border-width: 2; + -fx-border-color: #2c3041; } .list-cell { @@ -139,17 +142,21 @@ } .stack-pane { - -fx-background-color: #161d33; + -fx-background-color: #2c3041; + -fx-border-radius: 5; + -fx-background-radius: 5; + -fx-border-width: 2; + -fx-border-color: #2c3041; } .pane-with-border { - -fx-background-color: #161d33; - -fx-border-color: #192039; + -fx-background-color: #2c3041; + -fx-border-color: #242935; -fx-border-top-width: 1px; } .status-bar { - -fx-background-color: #192039; + -fx-background-color: #242935; } .result-display { @@ -171,8 +178,8 @@ } .status-bar-with-border { - -fx-background-color: #192039; - -fx-border-color: #192039; + -fx-background-color: #242935; + -fx-border-color: #242935; -fx-border-width: 1px; } @@ -181,17 +188,17 @@ } .grid-pane { - -fx-background-color: #192039; - -fx-border-color: #192039; + -fx-background-color: #242935; + -fx-border-color: #242935; -fx-border-width: 1px; } -.grid-pane .stack-pane { - -fx-background-color: #192039; +.grid-pane { + -fx-background-color: #242935; } .context-menu { - -fx-background-color: #192039; + -fx-background-color: #242935; } .context-menu .label { @@ -199,12 +206,13 @@ } .menu-bar { - -fx-background-color: #161d33; + -fx-background-color: #2c3041; } .menu-bar .label { - -fx-font-size: 14pt; - -fx-font-family: "Segoe UI Light"; + -fx-font-size: 10pt; + + -fx-font-family: "Century Gothic"; -fx-text-fill: white; -fx-opacity: 0.9; } @@ -223,7 +231,7 @@ -fx-border-color: #e2e2e2; -fx-border-width: 2; -fx-background-radius: 0; - -fx-background-color: #192039; + -fx-background-color: #242935; -fx-font-family: "Segoe UI", Helvetica, Arial, sans-serif; -fx-font-size: 11pt; -fx-text-fill: #d8d8d8; @@ -236,7 +244,7 @@ .button:pressed, .button:default:hover:pressed { -fx-background-color: white; - -fx-text-fill: #192039; + -fx-text-fill: #242935; } .button:focused { @@ -249,7 +257,7 @@ .button:disabled, .button:default:disabled { -fx-opacity: 0.4; - -fx-background-color: #192039; + -fx-background-color: #242935; -fx-text-fill: white; } @@ -263,11 +271,11 @@ } .dialog-pane { - -fx-background-color: #192039; + -fx-background-color: #242935; } .dialog-pane > *.button-bar > *.container { - -fx-background-color: #192039; + -fx-background-color: #242935; } .dialog-pane > *.label.content { @@ -277,7 +285,7 @@ } .dialog-pane:header *.header-panel { - -fx-background-color: derive(#192039, 25%); + -fx-background-color: derive(#242935, 25%); } .dialog-pane:header *.header-panel *.label { @@ -288,11 +296,11 @@ } .scroll-bar { - -fx-background-color: #192039; + -fx-background-color: #242935; } .scroll-bar .thumb { - -fx-background-color: #192039; + -fx-background-color: #242935; -fx-background-insets: 3; } @@ -314,7 +322,7 @@ } #cardPane { - -fx-background-color: #161d33; + -fx-background-color: #2c3041; -fx-border-width: 0; } @@ -334,12 +342,12 @@ -fx-text-fill: white; } -#filterField, #personListPanel, #personWebpage { +#filterField, #personListPanel { -fx-effect: innershadow(gaussian, black, 10, 0, 0, 0); } #resultDisplay .content { - -fx-background-color: transparent, #383838, transparent, #383838; + -fx-background-color: #2c3041; -fx-background-radius: 0; } @@ -452,4 +460,6 @@ #fridgeIdPlaceholder { -fx-text-fill: white; -fx-font-size: 10; -} \ No newline at end of file +} + + diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 5c32c336868..28f497835d5 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -33,36 +33,33 @@ - + + + + - - - - + + + + - - - - - - - + - + - + @@ -75,6 +72,16 @@ + + + + + + + + + + diff --git a/src/main/resources/view/PersonListPanel.fxml b/src/main/resources/view/PersonListPanel.fxml index 8836d323cc5..6412c9884d4 100644 --- a/src/main/resources/view/PersonListPanel.fxml +++ b/src/main/resources/view/PersonListPanel.fxml @@ -3,6 +3,6 @@ - + diff --git a/src/main/resources/view/ResultDisplay.fxml b/src/main/resources/view/ResultDisplay.fxml index 58d5ad3dc56..1da8b66716b 100644 --- a/src/main/resources/view/ResultDisplay.fxml +++ b/src/main/resources/view/ResultDisplay.fxml @@ -1,9 +1,12 @@ + - - diff --git a/src/main/resources/view/WorkerListCard.fxml b/src/main/resources/view/WorkerListCard.fxml index 2763047545a..6051edea2ca 100644 --- a/src/main/resources/view/WorkerListCard.fxml +++ b/src/main/resources/view/WorkerListCard.fxml @@ -9,7 +9,7 @@ - + From cfc8d9d16655317a2680a9e3beb54eb18071a7c5 Mon Sep 17 00:00:00 2001 From: shaoyi1997 Date: Mon, 21 Oct 2019 17:30:20 +0800 Subject: [PATCH 04/18] more ui rearrangement, coloring and headers --- .../java/seedu/address/ui/BodyTableView.java | 4 +- .../java/seedu/address/ui/FridgeIdLabel.java | 3 +- src/main/resources/view/DarkTheme.css | 62 +++++++++-------- src/main/resources/view/MainWindow.fxml | 69 ++++++++++++++----- 4 files changed, 89 insertions(+), 49 deletions(-) diff --git a/src/main/java/seedu/address/ui/BodyTableView.java b/src/main/java/seedu/address/ui/BodyTableView.java index 4778f99120a..cade679d0af 100644 --- a/src/main/java/seedu/address/ui/BodyTableView.java +++ b/src/main/java/seedu/address/ui/BodyTableView.java @@ -34,9 +34,9 @@ public class BodyTableView extends UiPart { private static final String FXML = "BodyTableView.fxml"; private static final double COLUMN_WIDTH_FRIDGE_ID = 0.1; - private static final double COLUMN_WIDTH_NAME = 0.225; + private static final double COLUMN_WIDTH_NAME = 0.2; private static final double COLUMN_WIDTH_ID = 0.15; - private static final double COLUMN_WIDTH_DATE_OF_ADMISSION = 0.25; + private static final double COLUMN_WIDTH_DATE_OF_ADMISSION = 0.275; private static final double COLUMN_WIDTH_BODY_STATUS = 0.26; private final Logger logger = LogsCenter.getLogger(BodyTableView.class); diff --git a/src/main/java/seedu/address/ui/FridgeIdLabel.java b/src/main/java/seedu/address/ui/FridgeIdLabel.java index e59a2a37354..82b663c30b8 100644 --- a/src/main/java/seedu/address/ui/FridgeIdLabel.java +++ b/src/main/java/seedu/address/ui/FridgeIdLabel.java @@ -31,8 +31,9 @@ public FridgeIdLabel(IdentificationNumber id) { fridgeIdPlaceholder.setText(id.toString()); circle.getStyleClass().add("fridgeIdCircleFilled"); } + fridgeIdPlaceholder.setStyle("-fx-font-weight: bold"); circle.setStrokeWidth(0.0); - circle.radiusProperty().bind(fridgeIdPlaceholder.widthProperty()); + circle.setRadius(15.0); } @Override diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index e3f345b9faa..202cb49f5da 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -8,29 +8,30 @@ } .label { - -fx-font-size: 11pt; - -fx-font-family: "Segoe UI Semibold"; + -fx-font-size: 10pt; + -fx-font-family: "Century Gothic"; + -fx-font-weight: 500; -fx-text-fill: #555555; -fx-opacity: 0.9; } .label-bright { -fx-font-size: 11pt; - -fx-font-family: "Segoe UI Semibold"; + -fx-font-family: "Century Gothic"; -fx-text-fill: white; -fx-opacity: 1; } .label-header { -fx-font-size: 32pt; - -fx-font-family: "Segoe UI Light"; + -fx-font-family: "Century Gothic"; -fx-text-fill: white; -fx-opacity: 1; } .text-field { -fx-font-size: 12pt; - -fx-font-family: "Segoe UI Semibold"; + -fx-font-family: "Century Gothic"; } .tab-pane { @@ -44,7 +45,7 @@ } .table-row-cell { - -fx-cell-size: 40px; + -fx-cell-size: 50px; } .table-view { @@ -71,7 +72,7 @@ .table-view .column-header .label { -fx-font-size: 10pt; -fx-font-family: "Century Gothic"; - -fx-text-fill: white; + -fx-text-fill: grey; -fx-alignment: center-left; -fx-opacity: 1; -fx-background-color: #2c3041; @@ -87,7 +88,7 @@ } .split-pane { - -fx-border-radius: 1; + -fx-border-radius: 2; -fx-border-width: 1; -fx-background-color: #2c3041; } @@ -96,7 +97,7 @@ -fx-background-insets: 0; -fx-padding: 0; -fx-background-color: #2c3041; - -fx-border-radius: 5; + -fx-border-radius: 10; -fx-background-radius: 5; -fx-border-width: 2; -fx-border-color: #2c3041; @@ -106,14 +107,15 @@ -fx-label-padding: 0 0 0 0; -fx-graphic-text-gap : 0; -fx-padding: 0 0 0 0; + -fx-background-color: #2c3041; } .list-cell:filled:even { - -fx-background-color: #3c3e3f; + -fx-background-color: #2c3041; } .list-cell:filled:odd { - -fx-background-color: #515658; + -fx-background-color: #2c3050; } .list-cell:filled:selected { @@ -121,7 +123,7 @@ } .list-cell:filled:selected #cardPane { - -fx-border-color: #3e7b91; + -fx-border-color: grey; -fx-border-width: 1; } @@ -130,20 +132,20 @@ } .cell_big_label { - -fx-font-family: "Segoe UI Semibold"; + -fx-font-family: "Century Gothic"; -fx-font-size: 16px; -fx-text-fill: #010504; } .cell_small_label { - -fx-font-family: "Segoe UI"; + -fx-font-family: "Century Gothic"; -fx-font-size: 13px; -fx-text-fill: #010504; } .stack-pane { -fx-background-color: #2c3041; - -fx-border-radius: 5; + -fx-border-radius: 10; -fx-background-radius: 5; -fx-border-width: 2; -fx-border-color: #2c3041; @@ -161,8 +163,8 @@ .result-display { -fx-background-color: transparent; - -fx-font-family: "Segoe UI Light"; - -fx-font-size: 13pt; + -fx-font-family: "Century Gothic"; + -fx-font-size: 10pt; -fx-text-fill: white; } @@ -171,7 +173,7 @@ } .status-bar .label { - -fx-font-family: "Segoe UI Light"; + -fx-font-family: "Century Gothic"; -fx-text-fill: white; -fx-padding: 4px; -fx-pref-height: 30px; @@ -232,7 +234,7 @@ -fx-border-width: 2; -fx-background-radius: 0; -fx-background-color: #242935; - -fx-font-family: "Segoe UI", Helvetica, Arial, sans-serif; + -fx-font-family: "Century Gothic", Helvetica, Arial, sans-serif; -fx-font-size: 11pt; -fx-text-fill: #d8d8d8; -fx-background-insets: 0 0 0 0, 0, 1, 2; @@ -322,7 +324,7 @@ } #cardPane { - -fx-background-color: #2c3041; + -fx-background-color: transparent; -fx-border-width: 0; } @@ -337,8 +339,8 @@ -fx-border-color: #383838 #383838 #ffffff #383838; -fx-border-insets: 0; -fx-border-width: 1; - -fx-font-family: "Segoe UI Light"; - -fx-font-size: 13pt; + -fx-font-family: "Century Gothic"; + -fx-font-size: 10pt; -fx-text-fill: white; } @@ -368,41 +370,45 @@ .bodyStatusLabelArrived { -fx-text-fill: black; -fx-background-color: #FF555E; - -fx-padding: 1 3 1 3; + -fx-padding: 2 5 2 5; -fx-border-radius: 2; -fx-background-radius: 2; -fx-font-size: 11; -fx-alignment: center; + -fx-font-weight: bold; } .bodyStatusLabelClaimed { -fx-text-fill: black; -fx-background-color: #8BF18B; - -fx-padding: 1 3 1 3; + -fx-padding: 2 5 2 5; -fx-border-radius: 2; -fx-background-radius: 2; -fx-font-size: 11; -fx-alignment: center; + -fx-font-weight: bold; } .bodyStatusLabelPending { -fx-text-fill: black; -fx-background-color: #FFE981; - -fx-padding: 1 3 1 3; + -fx-padding: 2 5 2 5; -fx-border-radius: 2; -fx-background-radius: 2; -fx-font-size: 11; -fx-alignment: center; + -fx-font-weight: bold; } .bodyStatusLabelPendingPoliceReport { -fx-text-fill: black; -fx-background-color: #FF8650; - -fx-padding: 1 3 1 3; + -fx-padding: 2 5 2 5; -fx-border-radius: 2; -fx-background-radius: 2; -fx-font-size: 11; -fx-alignment: center; + -fx-font-weight: bold; } .fridgeIdCircleEmpty { @@ -421,12 +427,12 @@ .chart-title { -fx-text-fill: white; - -fx-font-family: "Segoe UI Semibold"; + -fx-font-family: "Century Gothic"; } .axis-label { -fx-text-fill: white; - -fx-font-family: "Segoe UI Semibold"; + -fx-font-family: "Century Gothic"; -fx-font-size: 1em; } diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 28f497835d5..b6fb3c80dd4 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -6,10 +6,14 @@ + + + + @@ -32,21 +36,20 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -58,18 +61,24 @@ + + + - + + + + - + @@ -77,13 +86,37 @@ + + + - + + + + + + + + + + + + + + + + + + + + + + From d64664aaa1903e500f9b4f7b4bba9819633c9295 Mon Sep 17 00:00:00 2001 From: shaoyi1997 Date: Mon, 21 Oct 2019 19:41:15 +0800 Subject: [PATCH 05/18] add notification button --- .../java/seedu/address/ui/MainWindow.java | 7 ++ .../seedu/address/ui/NotificationButton.java | 83 ++++++++++++++++++ src/main/resources/images/bell_icon.png | Bin 0 -> 12437 bytes src/main/resources/view/DarkTheme.css | 3 + src/main/resources/view/MainWindow.fxml | 1 + .../resources/view/NotificationButton.fxml | 18 ++++ 6 files changed, 112 insertions(+) create mode 100644 src/main/java/seedu/address/ui/NotificationButton.java create mode 100644 src/main/resources/images/bell_icon.png create mode 100644 src/main/resources/view/NotificationButton.fxml diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java index 9574ca812b1..bdff556de43 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/address/ui/MainWindow.java @@ -39,6 +39,7 @@ public class MainWindow extends UiPart { private ResultDisplay resultDisplay; private HelpWindow helpWindow; private BodyMasterDetailPane bodyMasterDetailPane; + private NotificationButton notificationButton; @FXML private StackPane commandBoxPlaceholder; @@ -61,6 +62,9 @@ public class MainWindow extends UiPart { @FXML private StackPane bodyMasterListPlaceholder; + @FXML + private StackPane notificationButtonPlaceholder; + public MainWindow(Stage primaryStage, Logic logic) { super(FXML, primaryStage); @@ -138,6 +142,9 @@ void fillInnerParts() throws java.text.ParseException { logic.selectedBodyProperty(), logic::setSelectedBody), new BodyCardSelected(logic.selectedBodyProperty())); bodyMasterListPlaceholder.getChildren().add(bodyMasterDetailPane.getRoot()); + + notificationButton = new NotificationButton(); + notificationButtonPlaceholder.getChildren().add(notificationButton.getRoot()); } /** diff --git a/src/main/java/seedu/address/ui/NotificationButton.java b/src/main/java/seedu/address/ui/NotificationButton.java new file mode 100644 index 00000000000..3fb558f586e --- /dev/null +++ b/src/main/java/seedu/address/ui/NotificationButton.java @@ -0,0 +1,83 @@ +package seedu.address.ui; + +import java.util.logging.Logger; + +import javafx.animation.Interpolator; +import javafx.animation.TranslateTransition; +import javafx.beans.binding.DoubleBinding; +import javafx.beans.property.ReadOnlyDoubleProperty; +import javafx.beans.value.ChangeListener; +import javafx.fxml.FXML; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.image.ImageView; +import javafx.scene.layout.Region; +import javafx.scene.layout.StackPane; +import javafx.util.Duration; +import seedu.address.commons.core.LogsCenter; + +public class NotificationButton extends UiPart { + + private static final Logger logger = LogsCenter.getLogger(NotificationButton.class); + private static final String FXML = "NotificationButton.fxml"; + private static final String ICON_URL = "/images/bell_icon.png"; + + @FXML + private ImageView buttonIcon; + + @FXML + private Button notifButton; + + @FXML + private StackPane buttonPane; + + private Label iconNumber; + + public NotificationButton() { + super(FXML); + notifButton.setGraphic(buttonIcon); + notifButton.setStyle("-fx-border-width: 0"); + iconNumber = new Label(); + iconNumber.setText("1"); + addJumpingAnimation(); + addImageViewSizeBindings(); + bindToStack(); + } + + /** + * the jump animation changes the position of the mini-icon + */ + private void addJumpingAnimation() { + final TranslateTransition translateTransition = new TranslateTransition(Duration.millis(200), iconNumber); + final double start = 0.0; + final double end = start - 4.0; + translateTransition.setFromY(start); + translateTransition.setToY(end); + translateTransition.setCycleCount(-1); + translateTransition.setAutoReverse(true); + translateTransition.setInterpolator(Interpolator.EASE_BOTH); + translateTransition.play(); + } + + private void addImageViewSizeBindings() { + final ReadOnlyDoubleProperty widthProperty = notifButton.widthProperty(); + final ReadOnlyDoubleProperty heightProperty = notifButton.heightProperty(); + final DoubleBinding widthBinding = widthProperty.divide(4.0); + final DoubleBinding heightBinding = heightProperty.divide(4.0); + iconNumber.setPrefWidth(widthBinding.doubleValue()); + iconNumber.setPrefWidth(heightBinding.doubleValue()); + widthBinding.addListener((ChangeListener) (o, oldVal, newVal) -> + iconNumber.setPrefWidth(widthBinding.doubleValue())); + heightBinding.addListener((ChangeListener) (o, oldVal, newVal) -> + iconNumber.setPrefWidth(heightBinding.doubleValue())); + } + + private void bindToStack() { + buttonPane.setAlignment(iconNumber, Pos.TOP_RIGHT); + buttonPane.setMargin(iconNumber, new Insets(4, 6, 4, 4)); + buttonPane.getChildren().addAll(iconNumber); + } + +} diff --git a/src/main/resources/images/bell_icon.png b/src/main/resources/images/bell_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4d77a67ae4f267b53ae29b8ccf60af5c5b4029b8 GIT binary patch literal 12437 zcmZ{Kc|6qL_wajW3?X~=wG5NBWZzZ9kR?mRkg{dXPKePiYhx>Wwk+ARhxwEx6%sT)cwvEi&n2UJnVRwT}SvbOYPu57w^g5$e zy(>ZSPfEXuN<+kDo2357FY74D=YI90%6;S?RZR7{aLON%D^h`Zn~J*%c;1WuzP;x* zvhpqPN7wRf=VWX_*Y@V_Umfv77E3z5`CXr4hZTL}Q5gLH=Rb?`2`w1L$d6fvL4#4_ zh=#z_l{bZ*f^CP}M5sr}tgdcnHBIrQLbFVfnt_ag>L-;F9av&mBDLy`n!cOiOM^rX z$D~ac{(kmQif|dBtvY!GgI7tP!==ZwjYpHjlQIdH;fXokStv}-TeEnN3|$IGzX#!U z?zKD=rsLTz^z7q$LR|23rg`@FCuS`$_!ome2!DI?Y3KoC%F)vp{6lT14Nv7c_(~P3 zHy=D_h9CFZg{yPMy%OhJK(@$!3dZ20e2j@#NtVCI`UV0oC}HqEO%Roxf~H;|)v;~? z$-923ku29s`n8CUJUUL}OZOu=C*&eV(SL$Sjxoore3Fr)%qAV#e+k*Rt`Z)>F?QP# zcpg{&0~E$T^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mR=n>`}Z!`Ju6g{FFUoS>t=kKA)A?DV@%AU=lesoGpP_EkF|Pszm(!%UJ(S z{-@4is>SUa;hOs%@4K^6VdHMze;7g;>-XeCZoc%2zuYpqEo`j{5S zR9IHKVo_8wrTAXRk25cQ`1TYqtM$6^+SmTL|2A{&(fq0-9tod7_{#|mcO?g@{fLpp z2$3>X;;bFvI^FkX`4K%#F$`_8MWWMgY=PA0(f0Up?_UpYdn928lDW%g=rqDws9M%}MI1ZjDA^ZZ@C;c_`?{Ey6Qg$y>GT`%>3@orARI zx3f`0|GdW8^%j1Ru2A%j6V-S$t$@}^M@wIG6Acoq4;i{CiCKN>WwpnWs@Gsne{Tj2 z*mQL}+>emDHi=!7UTSFr&#$-1LL|!on?8R+cBRX*cFMG~=oE)TPLV=L0svAkPb3ZJ8%JqU27DIl$|(Z zfk#dJ*yug@sQN>&y3$M21A{MD;h=hvEThix`o=F??j~dKwk55caX*1GLSnkFx4~Y! zv7fZ67xg=#KD9w4a{T?}M<|SkPOi=x!*8irOh~n)DPE=QzO{d|@Xf31XY=kR(oFE& znupr%P`BnS5U%hEUMI2`4R+t4UlsG54ra83Ce{Xq$X5;v z;HhuC7=$&XF~1n1c(`T!Dp2MmO`9z=o{{Xzt4AB4p literal 0 HcmV?d00001 diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index 202cb49f5da..05943ab6508 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -468,4 +468,7 @@ -fx-font-size: 10; } +.stackPaneClip{ + -fx-background-radius: 20; +} diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index b6fb3c80dd4..7fa9e0c3c18 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -48,6 +48,7 @@ + diff --git a/src/main/resources/view/NotificationButton.fxml b/src/main/resources/view/NotificationButton.fxml new file mode 100644 index 00000000000..7d4816ac1a6 --- /dev/null +++ b/src/main/resources/view/NotificationButton.fxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + +