diff --git a/platform/platform-impl/src/com/intellij/ui/BalloonImpl.java b/platform/platform-impl/src/com/intellij/ui/BalloonImpl.java index 15bb60eb6a82..5d42a065f141 100644 --- a/platform/platform-impl/src/com/intellij/ui/BalloonImpl.java +++ b/platform/platform-impl/src/com/intellij/ui/BalloonImpl.java @@ -1330,6 +1330,11 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui { } public void _setBounds(Rectangle bounds) { + Rectangle currentBounds = getBounds(); + if (currentBounds.width != bounds.width || currentBounds.height != bounds.height) { + invalidateShadowImage(); + } + super.setBounds(bounds); if (myCloseRec.getParent() == null && getParent() != null) { myLayeredPane.add(myCloseRec); @@ -1357,6 +1362,11 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui { } } + private void invalidateShadowImage() { + myImage = null; + myShadow = null; + } + public void repaintButton() { myCloseRec.repaint(); }