From cf13311665fc54f0718765b40753991b55b58502 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 19 May 2021 09:32:55 +0200 Subject: [PATCH] add style class to used icon in result view --- .../ui/health/ResultSeverityTableCell.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/health/ResultSeverityTableCell.java b/main/ui/src/main/java/org/cryptomator/ui/health/ResultSeverityTableCell.java index 34caa558d..ee53debb8 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/health/ResultSeverityTableCell.java +++ b/main/ui/src/main/java/org/cryptomator/ui/health/ResultSeverityTableCell.java @@ -21,12 +21,24 @@ public class ResultSeverityTableCell extends TableCell FontAwesome5Icon.INFO_CIRCLE; - case GOOD -> FontAwesome5Icon.CHECK; - case WARN -> FontAwesome5Icon.EXCLAMATION_TRIANGLE; - case CRITICAL -> FontAwesome5Icon.TIMES; - }); + switch (item) { + case INFO -> { + iconView.setGlyph(FontAwesome5Icon.INFO_CIRCLE); + iconView.getStyleClass().add("glyph-icon-muted"); + } + case GOOD -> { + iconView.setGlyph(FontAwesome5Icon.CHECK); + iconView.getStyleClass().add("glyph-icon-primary"); + } + case WARN -> { + iconView.setGlyph(FontAwesome5Icon.EXCLAMATION_TRIANGLE); + iconView.getStyleClass().add("glyph-icon-orange"); + } + case CRITICAL -> { + iconView.setGlyph(FontAwesome5Icon.TIMES); + iconView.getStyleClass().add("glyph-icon-red"); + } + } setGraphic(iconView); setText(item.name()); }