IDEA-198348: hide track of transparent scroll bar on Mac if thumb is hidden

This commit is contained in:
Sergey Malenkov
2019-01-18 19:55:13 +03:00
parent 4ec5617c78
commit f82a147dce
@@ -87,6 +87,11 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
void onThumbHover(boolean hover) {
}
@Override
void paintTrack(Graphics2D g, JComponent c) {
if (myTrack.animator.myValue > 0 && myThumb.animator.myValue > 0 || isOpaque(c)) super.paintTrack(g, c);
}
@Override
void paintThumb(Graphics2D g, JComponent c) {
if (isOpaque(c)) {