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