From b4445f42af4268b255e65eef32037bd5c0e231b6 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 22 Apr 2016 12:39:39 +0300 Subject: [PATCH] IDEA-155043 Can't grab inactive scroll bar on OS X --- .../src/com/intellij/util/ui/ButtonlessScrollBarUI.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/util/ui/ButtonlessScrollBarUI.java b/platform/platform-api/src/com/intellij/util/ui/ButtonlessScrollBarUI.java index 566f62f9d0bb..b1429f7e0086 100644 --- a/platform/platform-api/src/com/intellij/util/ui/ButtonlessScrollBarUI.java +++ b/platform/platform-api/src/com/intellij/util/ui/ButtonlessScrollBarUI.java @@ -801,8 +801,10 @@ public class ButtonlessScrollBarUI extends BasicScrollBarUI { Graphics2D g2d = (Graphics2D)g; if (Registry.is("mac.scroll.new.ui")) { float value = (float)(1 - myMacScrollbarFadeLevel); - RegionPainter painter = isDark() ? JBScrollPane.MAC_THUMB_DARK_PAINTER : JBScrollPane.MAC_THUMB_PAINTER; - painter.paint(g2d, thumbBounds.x - 2, thumbBounds.y - 2, thumbBounds.width + 4, thumbBounds.height + 4, value); + if (!myMacScrollbarHidden || alwaysPaintThumb()) { + RegionPainter painter = isDark() ? JBScrollPane.MAC_THUMB_DARK_PAINTER : JBScrollPane.MAC_THUMB_PAINTER; + painter.paint(g2d, thumbBounds.x - 2, thumbBounds.y - 2, thumbBounds.width + 4, thumbBounds.height + 4, value); + } return; } RenderingHints oldHints = g2d.getRenderingHints();