Skip to content

Commit

Permalink
Allow locally customizing the color of progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
strangelookingnerd committed Sep 17, 2024
1 parent b2f2e5d commit 4241a3a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
54 changes: 54 additions & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

### Added

- Allow locally customizing the color of progress bar

## [0.0.4] - 2024-07-31

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ protected void paintIndeterminate(Graphics graphics, JComponent component) {
startColor = WARNING_COLOR;
endColor = WARNING_END_COLOR;
} else {
startColor = INDETERMINATE_START_COLOR;
endColor = INDETERMINATE_END_COLOR;
startColor = progressBar.getClientProperty("ProgressBar.indeterminateStartColor") instanceof Color color ?
color : INDETERMINATE_START_COLOR;
endColor = progressBar.getClientProperty("ProgressBar.indeterminateEndColor") instanceof Color color ?
color : INDETERMINATE_END_COLOR;
}

Shape shape;
Expand Down

0 comments on commit 4241a3a

Please sign in to comment.