affect visibility rect only under header IDEA-230387

GitOrigin-RevId: f285cae00872912b3ab5736e41f23e38c0a69f7f
This commit is contained in:
Alexander Kass
2020-01-13 13:12:43 +00:00
committed by intellij-monorepo-bot
parent 571b1a537b
commit e535bbd906
@@ -80,7 +80,11 @@ public class GradientViewport extends JBViewport {
Component header = getHeader();
if (header != null) {
int h = header.getPreferredSize().height;
bounds.y -= h;
if (bounds.y < h) {
bounds = new Rectangle(bounds);
bounds.y -= h;
bounds.height += h;
}
}
super.scrollRectToVisible(bounds);
}