From c3884ed4b3fcc8e8baedd4b2bf2816de14f38a1f Mon Sep 17 00:00:00 2001 From: Kirill Kalishev Date: Mon, 19 Dec 2011 21:48:16 +0300 Subject: [PATCH] balloon: shadow gets updated on change size --- .../platform-impl/src/com/intellij/ui/BalloonImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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(); }