Browse Source

Adjusted ProgressBar foreground.

Signed-off-by: weisj <weisj@arcor.de>
pull/52/head
weisj 5 years ago
parent
commit
ee297f1ed8
  1. 13
      core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java
  2. 4
      core/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties
  3. 3
      core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties
  4. 3
      core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties
  5. 4
      core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties
  6. 3
      core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties
  7. 3
      core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties

13
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();
}
}
}
}

4
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
ProgressBar.stripeWidth = 4

3
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
%shadowHeight = 3

3
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
%shadowHeight = 2

4
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
Button.shadow = 808080
ProgressBar.selectionForeground = %textSelectionForeground
ProgressBar.selectionBackground = %textForeground

3
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
%shadowHeight = 3

3
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
%shadowHeight = 2

Loading…
Cancel
Save