IDEA-131429 Warning tooltips overlap scrollbar
authorVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Tue, 7 Jul 2015 21:07:47 +0000 (00:07 +0300)
committerVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Tue, 7 Jul 2015 21:08:42 +0000 (00:08 +0300)
Give Balloon the last chance to have pointer.

platform/platform-impl/src/com/intellij/ui/BalloonImpl.java

index d60649e096a05419aa140e02cec8c4bb8b03b84a..b2fe047b61cbab3b27c9f03ed6e87a5787291f54 100644 (file)
@@ -1014,14 +1014,13 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui {
       UnfairTextRange balloonRange;
       UnfairTextRange pointerRange;
       if (isTopBottomPointer()) {
-        balloonRange = new UnfairTextRange(bounds.x + arc, bounds.x + bounds.width - arc * 2);
+        balloonRange = new UnfairTextRange(bounds.x + arc - 1, bounds.x + bounds.width - arc * 2 + 1);
         pointerRange = new UnfairTextRange(targetPoint.x - pointerWidth / 2, targetPoint.x + pointerWidth / 2);
       }
       else {
-        balloonRange = new UnfairTextRange(bounds.y + arc, bounds.y + bounds.height - arc * 2);
+        balloonRange = new UnfairTextRange(bounds.y + arc - 1, bounds.y + bounds.height - arc * 2 + 1);
         pointerRange = new UnfairTextRange(targetPoint.y - pointerWidth / 2, targetPoint.y + pointerWidth / 2);
       }
-
       return balloonRange.contains(pointerRange);
     }