Skip to content

Commit

Permalink
Merge pull request #283 from ong6/UI-Update
Browse files Browse the repository at this point in the history
UI Bug Fix + Update
  • Loading branch information
tjtanjin authored Mar 16, 2021
2 parents 94081c6 + 4be6043 commit 1a646de
Show file tree
Hide file tree
Showing 12 changed files with 390 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public FindCommand parse(String args) throws ParseException {

String[] nameKeywords;

//to-do jun xiong update this to use swtich case? or find a better way to do this
if (argMultimap.arePrefixesPresent(PREFIX_METHOD)) {
String input = argMultimap.getValue(PREFIX_METHOD).get();
nameKeywords = getNameKeywords(input);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/seedu/us/among/ui/ResultDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public class ResultDisplay extends UiPart<Region> {
private ImageView loadingSpinnerPlaceholder;
@FXML
private ImageView errorPlaceholder;
@FXML
private ImageView backgroundPlaceholder;
// @FXML
// private ImageView backgroundPlaceholder;

private Timeline errorGifTimeline;

private final Image background = new Image(this.getClass().getResourceAsStream("/images/background.png"));
// private final Image background = new Image(this.getClass().getResourceAsStream("/images/background.png"));
private final Image loadingSpinner = new Image(this.getClass().getResourceAsStream("/images/loading_spinner.gif"));
private final Image error = new Image(this.getClass().getResourceAsStream("/images/error.gif"));

Expand All @@ -46,7 +46,7 @@ public ResultDisplay() {
super(FXML);
this.loadingSpinnerPlaceholder.setImage(loadingSpinner);
this.errorPlaceholder.setImage(error);
this.backgroundPlaceholder.setImage(background);
// this.backgroundPlaceholder.setImage(background);
// Set timeline for error message
this.errorGifTimeline = new Timeline(
new KeyFrame(Duration.ZERO, x -> this.getErrorPlaceholder().setVisible(true)),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/us/among/ui/ThemeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//Solution below adapted from
//https://www.stubbornjava.com/posts/java-enum-lookup-by-name-or-field-without-throwing-exceptions
public enum ThemeType {
LIGHT, DARK;
LIGHT, DARK, IMPOSTER;

private static final Map<String, ThemeType> themeIndex = new HashMap<>();

Expand Down
Binary file added src/main/resources/images/BackgourndImposter.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/BackgroundDark.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/BackgroundLight.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/background2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@
}

#resultDisplay .content {
-fx-background-image: url('/images/BackgourndDark.png');
-fx-background-color: transparent, #383838, transparent, #383838;
-fx-background-radius: 0;
}
Expand Down
Loading

0 comments on commit 1a646de

Please sign in to comment.