|
24 | 24 |
|
25 | 25 | package com.github.strangelookingnerd;
|
26 | 26 |
|
27 |
| -import com.intellij.openapi.progress.util.ColorProgressBar; |
28 | 27 | import com.intellij.ui.scale.JBUIScale;
|
29 | 28 | import com.intellij.util.ui.JBInsets;
|
30 | 29 | import com.intellij.util.ui.JBUI;
|
@@ -95,13 +94,13 @@ protected void paintIndeterminate(Graphics graphics, JComponent component) {
|
95 | 94 | Color endColor;
|
96 | 95 | Color foreground = progressBar.getForeground();
|
97 | 96 | Object statusProperty = progressBar.getClientProperty(JBUI.CurrentTheme.ProgressBar.statusKey());
|
98 |
| - if (JBUI.CurrentTheme.ProgressBar.failedStatusValue().equals(statusProperty) || foreground == ColorProgressBar.RED) { |
| 97 | + if (JBUI.CurrentTheme.ProgressBar.failedStatusValue().equals(statusProperty) || foreground == JBUI.CurrentTheme.ProgressBar.FAILED) { |
99 | 98 | startColor = JBUI.CurrentTheme.ProgressBar.FAILED;
|
100 | 99 | endColor = JBUI.CurrentTheme.ProgressBar.FAILED_END;
|
101 |
| - } else if (JBUI.CurrentTheme.ProgressBar.passedStatusValue().equals(statusProperty) || foreground == ColorProgressBar.GREEN) { |
| 100 | + } else if (JBUI.CurrentTheme.ProgressBar.passedStatusValue().equals(statusProperty) || foreground == JBUI.CurrentTheme.ProgressBar.PASSED) { |
102 | 101 | startColor = JBUI.CurrentTheme.ProgressBar.PASSED;
|
103 | 102 | endColor = JBUI.CurrentTheme.ProgressBar.PASSED_END;
|
104 |
| - } else if (JBUI.CurrentTheme.ProgressBar.warningStatusValue().equals(statusProperty) || foreground == ColorProgressBar.YELLOW) { |
| 103 | + } else if (JBUI.CurrentTheme.ProgressBar.warningStatusValue().equals(statusProperty) || foreground == JBUI.CurrentTheme.ProgressBar.WARNING) { |
105 | 104 | startColor = JBUI.CurrentTheme.ProgressBar.WARNING;
|
106 | 105 | endColor = JBUI.CurrentTheme.ProgressBar.WARNING_END;
|
107 | 106 | } else {
|
@@ -188,11 +187,11 @@ protected void paintDeterminate(Graphics graphics, JComponent component) {
|
188 | 187 |
|
189 | 188 | Color foreground = progressBar.getForeground();
|
190 | 189 | Object statusProperty = progressBar.getClientProperty(JBUI.CurrentTheme.ProgressBar.statusKey());
|
191 |
| - if (JBUI.CurrentTheme.ProgressBar.failedStatusValue().equals(statusProperty) || foreground == ColorProgressBar.RED) { |
| 190 | + if (JBUI.CurrentTheme.ProgressBar.failedStatusValue().equals(statusProperty) || foreground == JBUI.CurrentTheme.ProgressBar.FAILED) { |
192 | 191 | graphics.setColor(JBUI.CurrentTheme.ProgressBar.FAILED);
|
193 |
| - } else if (JBUI.CurrentTheme.ProgressBar.passedStatusValue().equals(statusProperty) || foreground == ColorProgressBar.GREEN) { |
| 192 | + } else if (JBUI.CurrentTheme.ProgressBar.passedStatusValue().equals(statusProperty) || foreground == JBUI.CurrentTheme.ProgressBar.PASSED) { |
194 | 193 | graphics.setColor(JBUI.CurrentTheme.ProgressBar.PASSED);
|
195 |
| - } else if (JBUI.CurrentTheme.ProgressBar.warningStatusValue().equals(statusProperty) || foreground == ColorProgressBar.YELLOW) { |
| 194 | + } else if (JBUI.CurrentTheme.ProgressBar.warningStatusValue().equals(statusProperty) || foreground == JBUI.CurrentTheme.ProgressBar.WARNING) { |
196 | 195 | graphics.setColor(JBUI.CurrentTheme.ProgressBar.WARNING);
|
197 | 196 | } else {
|
198 | 197 | graphics2D.setColor(JBUI.CurrentTheme.ProgressBar.PROGRESS);
|
|
0 commit comments