From 2d43f9550c2ab906b480665f2b257b812a76a745 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Mon, 1 Feb 2016 20:26:02 +0300 Subject: [PATCH] IDEA-148164 update thumb bounds before paint error stripes --- .../src/com/intellij/ui/components/AbstractScrollBarUI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ui/components/AbstractScrollBarUI.java b/platform/platform-api/src/com/intellij/ui/components/AbstractScrollBarUI.java index 57f37250ee5f..0d37f0e054c3 100644 --- a/platform/platform-api/src/com/intellij/ui/components/AbstractScrollBarUI.java +++ b/platform/platform-api/src/com/intellij/ui/components/AbstractScrollBarUI.java @@ -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 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); }