IDEA-148164 update thumb bounds before paint error stripes

This commit is contained in:
Sergey Malenkov
2016-02-01 20:33:04 +03:00
parent 7659061026
commit 2d43f9550c
@@ -192,14 +192,14 @@ abstract class AbstractScrollBarUI extends ScrollBarUI {
bounds.width -= size;
bounds.x += size;
}
// process additional drawing on the track
myTrackBounds.setBounds(bounds);
updateThumbBounds();
// process additional drawing on the track
RegionPainter<Object> track = UIUtil.getClientProperty(c, JBScrollBar.TRACK);
if (track != null && myTrackBounds.width > 0 && myTrackBounds.height > 0) {
track.paint((Graphics2D)g, myTrackBounds.x, myTrackBounds.y, myTrackBounds.width, myTrackBounds.height, null);
}
// process drawing the thumb
updateThumbBounds();
if (myThumbBounds.width > 0 && myThumbBounds.height > 0) {
paintThumb((Graphics2D)g, myThumbBounds.x, myThumbBounds.y, myThumbBounds.width, myThumbBounds.height, c);
}