diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java index dc4f2734..381c5344 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java @@ -208,26 +208,21 @@ public class DarkProgressBarUI extends BasicProgressBarUI implements PropertyCha g.setFont(progressBar.getFont()); Point renderLocation = getStringPlacement(g, progressString, x, y, w, h); + g.setColor(getSelectionBackground()); if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) { - g.setColor(getSelectionBackground()); g.drawString(progressString, renderLocation.x, renderLocation.y); - - g.setColor(getSelectionForeground()); g.clipRect(fillStart, y, amountFull, h); - g.drawString(progressString, renderLocation.x, renderLocation.y); - } else { // VERTICAL AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2); g.setFont(progressBar.getFont().deriveFont(rotate)); renderLocation = getStringPlacement(g, progressString, x, y, w, h); - g.setColor(getSelectionBackground()); g.drawString(progressString, renderLocation.x, renderLocation.y); g.clipRect(x, fillStart, w, amountFull); - g.setColor(getSelectionForeground()); - g.drawString(progressString, renderLocation.x, renderLocation.y); } + g.setColor(getSelectionForeground()); + g.drawString(progressString, renderLocation.x, renderLocation.y); config.restore(); } @@ -354,4 +349,4 @@ public class DarkProgressBarUI extends BasicProgressBarUI implements PropertyCha progressBar.repaint(); } } -} \ No newline at end of file +} diff --git a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties index 0e1b4ff6..407b8909 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties @@ -25,6 +25,8 @@ ProgressBarUI = com.github.weisj.darklaf.ui.progressbar.DarkProgressBarUI ProgressBar.border = com.github.weisj.darklaf.ui.progressbar.DarkProgressBarBorder ProgressBar.foreground = %textForeground +ProgressBar.selectionForeground = %textContrastForeground +ProgressBar.selectionBackground = %textForeground ProgressBar.trackColor = %controlBackground ProgressBar.progressColor = %controlFillSecondary @@ -37,4 +39,4 @@ ProgressBar.passedColor = %controlPassedFadeStart ProgressBar.passedEndColor = %controlPassedFadeEnd ProgressBar.isSimplified = false -ProgressBar.stripeWidth = 4 \ No newline at end of file +ProgressBar.stripeWidth = 4 diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties index a6f37dd3..fb6c0fc4 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties @@ -105,6 +105,7 @@ %textForegroundInactive = 777777 %textForegroundSecondary = 919191 %acceleratorForeground = eeeeee +%textContrastForeground = 000000 %textSelectionForeground = bbbbbb %textSelectionForegroundInactive = bbbbbb @@ -138,4 +139,4 @@ %arcSecondaryFocus = 3 %borderThickness = 3 -%shadowHeight = 3 \ No newline at end of file +%shadowHeight = 3 diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties index a782fd1d..965f66b5 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties @@ -107,6 +107,7 @@ %textForegroundInactive = 777777 %textForegroundSecondary = 808080 %acceleratorForeground = 505050 +%textContrastForeground = f0f0f0 %textSelectionForeground = f0f0f0 %textSelectionForegroundInactive = 000000 @@ -140,4 +141,4 @@ %arcSecondaryFocus = 3 %borderThickness = 3 -%shadowHeight = 2 \ No newline at end of file +%shadowHeight = 2 diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties index e6617704..fe55ce08 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties @@ -22,4 +22,6 @@ # SOFTWARE. # # suppress inspection "UnusedProperty" for whole file -Button.shadow = 808080 \ No newline at end of file +Button.shadow = 808080 +ProgressBar.selectionForeground = %textSelectionForeground +ProgressBar.selectionBackground = %textForeground diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties index b8c67453..46a6dd48 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties @@ -105,6 +105,7 @@ %textForegroundInactive = 839496 %textForegroundSecondary = 839496 %acceleratorForeground = 527FBF +%textContrastForeground = 000000 %textSelectionForeground = ACBCC0 %textSelectionForegroundInactive = A7B6BA @@ -140,4 +141,4 @@ %arcSecondaryFocus = 3 %borderThickness = 3 -%shadowHeight = 3 \ No newline at end of file +%shadowHeight = 3 diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties index 4053bd0a..9dee7c2b 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties @@ -106,6 +106,7 @@ %textForegroundInactive = 657b83 %textForegroundSecondary = 586e75 %acceleratorForeground = 617EB3 +%textContrastForeground = FFFFFF %textSelectionForeground = FFFFFF %textSelectionForegroundInactive = 2E4E58 @@ -139,4 +140,4 @@ %arcSecondaryFocus = 3 %borderThickness = 3 -%shadowHeight = 2 \ No newline at end of file +%shadowHeight = 2