Browse Source

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

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

【改动思路】
同上
persist/11.0
Starryi 3 years ago
parent
commit
c3a5416395
  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,13 +3,13 @@ package com.fr.design.cell;
import com.fr.base.NameStyle;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.general.IOUtils;
import javax.swing.JPanel;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
/**
* @author Starryi
@ -18,7 +18,7 @@ import java.awt.Toolkit;
*/
public class CellStylePreviewPane extends JPanel {
private static final Image transparentBackgroundImage = Toolkit.getDefaultToolkit().createImage(CellStylePreviewPane.class.getResource("/com/fr/design/images/transparent_background.png"));
private static final BufferedImage transparentBackgroundImage = IOUtils.readImage("/com/fr/design/images/transparent_background.png");
private final float transparentBackgroundWidth;
private final float transparentBackgroundHeight;
private String paintText = "Report";
@ -38,7 +38,7 @@ public class CellStylePreviewPane extends JPanel {
}
@Override
public void paintComponent(Graphics g) {
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
int resolution = ScreenResolution.getScreenResolution();

Loading…
Cancel
Save