Skip to content

Commit 49814bb

Browse files
Remove deprecations
1 parent 0308e86 commit 49814bb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/main/java/com/github/strangelookingnerd/PedroProgressBarUI.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
package com.github.strangelookingnerd;
2626

27-
import com.intellij.openapi.progress.util.ColorProgressBar;
2827
import com.intellij.ui.scale.JBUIScale;
2928
import com.intellij.util.ui.JBInsets;
3029
import com.intellij.util.ui.JBUI;
@@ -95,13 +94,13 @@ protected void paintIndeterminate(Graphics graphics, JComponent component) {
9594
Color endColor;
9695
Color foreground = progressBar.getForeground();
9796
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) {
9998
startColor = JBUI.CurrentTheme.ProgressBar.FAILED;
10099
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) {
102101
startColor = JBUI.CurrentTheme.ProgressBar.PASSED;
103102
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) {
105104
startColor = JBUI.CurrentTheme.ProgressBar.WARNING;
106105
endColor = JBUI.CurrentTheme.ProgressBar.WARNING_END;
107106
} else {
@@ -188,11 +187,11 @@ protected void paintDeterminate(Graphics graphics, JComponent component) {
188187

189188
Color foreground = progressBar.getForeground();
190189
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) {
192191
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) {
194193
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) {
196195
graphics.setColor(JBUI.CurrentTheme.ProgressBar.WARNING);
197196
} else {
198197
graphics2D.setColor(JBUI.CurrentTheme.ProgressBar.PROGRESS);

0 commit comments

Comments
 (0)