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

@@ -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 );
}