Browse Source

Adjusted ProgressBar foreground.

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

9
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);
if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
g.setColor(getSelectionBackground());
if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
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);
}
config.restore();
}

2
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

1
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

1
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

2
core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties

@ -23,3 +23,5 @@
#
# suppress inspection "UnusedProperty" for whole file
Button.shadow = 808080
ProgressBar.selectionForeground = %textSelectionForeground
ProgressBar.selectionBackground = %textForeground

1
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

1
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

Loading…
Cancel
Save