From c9403afee47119d762f86b347fd33d50714b9a5a Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 3 Sep 2021 14:48:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58503=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E9=A2=84=E8=A7=88=E5=8C=BAui?= =?UTF-8?q?=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 单元格样式预览显示透明块 【改动思路】 同上 --- .../java/com/fr/design/cell/CellStylePreviewPane.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java b/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java index d566bbf987..af4bc8a9be 100644 --- a/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java @@ -3,11 +3,7 @@ package com.fr.design.cell; import com.fr.base.NameStyle; import com.fr.base.ScreenResolution; import com.fr.base.Style; -import com.fr.design.mainframe.theme.TemplateThemeBlock; -import com.fr.general.IOUtils; -import javax.swing.Icon; -import javax.swing.JComponent; import javax.swing.JPanel; import java.awt.Dimension; import java.awt.Graphics; @@ -25,14 +21,12 @@ public class CellStylePreviewPane extends JPanel { private static final Image transparentBackgroundImage = Toolkit.getDefaultToolkit().createImage(CellStylePreviewPane.class.getResource("/com/fr/design/images/transparent_background.png")); private final float transparentBackgroundWidth; private final float transparentBackgroundHeight; - private final float transparentBackgroundAspect; private String paintText = "Report"; private Style style = Style.DEFAULT_STYLE; public CellStylePreviewPane() { transparentBackgroundWidth = transparentBackgroundImage.getWidth(null); transparentBackgroundHeight = transparentBackgroundImage.getHeight(null); - transparentBackgroundAspect = 1.0F * transparentBackgroundImage.getWidth(null) / transparentBackgroundImage.getHeight(null); } public void setStyle(Style style) { @@ -72,7 +66,7 @@ public class CellStylePreviewPane extends JPanel { Style.paintContent(g2d, paintText, style, width, height, resolution); - Style.paintBorder(g2d, style, getWidth() - 3, getHeight() - 3); + Style.paintBorder(g2d, style, width, height); } @Override