From a3502c3df1efabddfb2c109f40b314633d34e722 Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Thu, 6 Mar 2025 15:23:02 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-148067=E3=80=90=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E3=80=91=E5=BC=80=E5=90=AF=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A2=9E=E5=BC=BA=E5=90=8E=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=89=93=E5=BC=80=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/widgettheme/theme/panel/ControlPreviewCell.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } }