Skip to content

Commit

Permalink
Add lighter colors
Browse files Browse the repository at this point in the history
  • Loading branch information
simonharrer committed Nov 23, 2015
1 parent 1cfee69 commit 3e64e40
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/net/sf/jabref/gui/search/SearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,20 @@
*/
public class SearchBar extends JPanel {

public static final Color NO_RESULTS_COLOR = new Color(232, 202, 202);
public static final Color RESULTS_FOUND_COLOR = new Color(217, 232, 202);

private SearchQuery getSearchQuery() {
return new SearchQuery(this.searchField.getText(), this.caseSensitive.isSelected(), this.regularExp.isSelected());
}

public void updateResults(int matched, String description) {
if (matched == 0) {
this.currentResults.setText(Localization.lang("No results found."));
this.searchField.setBackground(Color.RED);
this.searchField.setBackground(NO_RESULTS_COLOR);
} else {
this.currentResults.setText(Localization.lang("Found %0 results.", String.valueOf(matched)));
this.searchField.setBackground(Color.GREEN);
this.searchField.setBackground(RESULTS_FOUND_COLOR);
}
this.searchField.setToolTipText("<html>" + description + "</html>");
}
Expand Down

0 comments on commit 3e64e40

Please sign in to comment.