diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java index ec36032713..fcf2a75b40 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java @@ -101,7 +101,12 @@ public class ControlPreviewCell extends JPanel { if (this.reportTheme != null) { if (icon instanceof ImageIcon) { ImageIcon imageIcon = (ImageIcon) icon; - BufferedImage bufferedImage = ImageUtils.colorImage(ImageUtils.imageIconToBufferedImage(imageIcon), getIconColor()); + BufferedImage bufferedImage = ImageUtils.imageIconToBufferedImage(imageIcon); + Color iconColor = getIconColor(); + // 设置为透明色时color是null + if (iconColor != null) { + ImageUtils.colorImage(bufferedImage, iconColor); + } return new ImageIcon(bufferedImage); } }