From 0da7995ab60828a2bab2aa0d10ce8c6558a3bcd9 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 30 Aug 2021 19:51:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58390=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E7=BB=86=E8=8A=82=E5=AE=9A=E5=88=B6?= =?UTF-8?q?-=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E7=9A=84=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E8=83=8C=E6=99=AF-=E4=B8=8D=E9=80=8F=E6=98=8E?= =?UTF-8?q?=E5=BA=A6=E9=99=8D=E4=BD=8E=E5=90=8E=EF=BC=8C=E7=BC=A9=E7=95=A5?= =?UTF-8?q?=E5=9B=BE=E4=BC=9A=E5=8F=98=E6=9A=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 缩略图改为手动绘制后,不存在这个问题了,不过还是给个默认的 白色背景 【改动思路】 同上 --- .../com/fr/design/mainframe/theme/TemplateThemeBlock.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java index d014199f35..e00bc445c0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java @@ -211,6 +211,11 @@ public class TemplateThemeBlock extends JPanel { public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D) g; + Color oldColor = g2d.getColor(); + g2d.setColor(Color.WHITE); + g2d.fillRect(0, 0, getWidth(), getHeight()); + g2d.setColor(oldColor); + paintCenterImage(g2d, thumbnail != null ? thumbnail : LOADING_IMAGE); }