Browse Source

REPORT-148067【模板主题】开启控件显示增强后模板主题打开显示不全

release/11.0
lidongy 1 month ago
parent
commit
a3502c3df1
  1. 7
      designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java

7
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);
}
}

Loading…
Cancel
Save