Slider: fixed painting of colored track if JSlider.inverted is true

This commit is contained in:
Karl Tauber
2020-12-19 17:01:34 +01:00
parent a7c6a881b3
commit 3c58879ce5
2 changed files with 7 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ FlatLaf Change Log
#### Fixed bugs
- Slider: Fixed painting of colored track if `JSlider.inverted` is `true`.
- Table and TableHeader: Fixed missing right vertical grid line if using table
as row header in scroll pane. (issues #152 and #46)
- TableHeader: Fixed position of column separators in right-to-left component

View File

@@ -279,6 +279,12 @@ debug*/
}
if( coloredTrack != null ) {
if( slider.getInverted() ) {
RoundRectangle2D temp = track;
track = coloredTrack;
coloredTrack = temp;
}
g.setColor( trackValueColor );
((Graphics2D)g).fill( coloredTrack );
}