fixed shadows on hidpi (we do not have x2 icons and scaled regular icons, which must...
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Tue, 15 Nov 2016 12:30:04 +0000 (15:30 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Tue, 15 Nov 2016 12:30:43 +0000 (15:30 +0300)
platform/platform-impl/src/com/intellij/openapi/ui/impl/ShadowPainter.java

index 89ce58d1ee9e34e7ec947bd552dbc30cc69899e8..9749f4abc6139145f2b1d25e97ea4c14a3fb199b 100644 (file)
@@ -15,6 +15,7 @@
  */
 package com.intellij.openapi.ui.impl;
 
+import com.intellij.util.IconUtil;
 import org.jetbrains.annotations.Nullable;
 
 import javax.swing.*;
@@ -37,13 +38,13 @@ public class ShadowPainter {
   private Color myBorderColor;
 
   public ShadowPainter(Icon top, Icon topRight, Icon right, Icon bottomRight, Icon bottom, Icon bottomLeft, Icon left, Icon topLeft) {
-    myTop = top;
+    myTop = IconUtil.cropIcon(top, 1, Integer.MAX_VALUE);
     myTopRight = topRight;
-    myRight = right;
+    myRight = IconUtil.cropIcon(right, Integer.MAX_VALUE, 1);
     myBottomRight = bottomRight;
-    myBottom = bottom;
+    myBottom = IconUtil.cropIcon(bottom, 1, Integer.MAX_VALUE);
     myBottomLeft = bottomLeft;
-    myLeft = left;
+    myLeft = IconUtil.cropIcon(left, Integer.MAX_VALUE, 1);
     myTopLeft = topLeft;
   }