Browse Source

REPORT-58503 【主题切换】预览区ui改版

【问题原因】
单元格样式预览显示透明块

【改动思路】
同上
persist/11.0
Starryi 3 years ago
parent
commit
c9403afee4
  1. 8
      designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java

8
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

Loading…
Cancel
Save