Browse Source

REPORT-57966 【主题切换】模板主题页面的√显示不全

【问题原因】
动态获取列表项的尺寸,计算图标的位置

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
d6d2620968
  1. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

6
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

@ -23,8 +23,10 @@ import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Window;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -179,12 +181,14 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
@Override
public void paint(Graphics g) {
super.paint(g);
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
JTemplate<?,?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template != null) {
TemplateThemeConfig<? extends TemplateTheme> templateUsingConfig = template.getUsingTemplateThemeConfig();
TemplateTheme templateTheme = template.getTemplateTheme();
if (templateUsingConfig == this.config && StringUtils.equals(templateTheme.getName(), name)) {
theme4currentTemplateMarkIcon.paintIcon(this, g, 176, 0);
theme4currentTemplateMarkIcon.paintIcon(this, g, getWidth() - 25, 0);
}
}

Loading…
Cancel
Save