Browse Source

Pull request #2433: REPORT-40495 设计面板-多sheet-windows下韩文名称的sheet不被选中时不显示名称

Merge in DESIGN/design from ~YVAN/design:release/10.0 to release/10.0

* commit '2cb92e14d1fa0564fe262200b08d3997adbbe4a2':
  更新注释,明确bug原因
  REPORT-40495 设计面板-多sheet-windows下韩文名称的sheet不被选中时不显示名称 【问题原因】之前用的Graphics2D的drawString方法,无法画出韩文的sheetName,debug发现走到里面,fontInfo中的font=null,而GraphHelper的drawString方法,这个方法debug走到里面发现font一直是正常的,并且两个方法里面的Graphics2D也都是SunGraphics2D,就很奇怪,没搞懂为啥 【改动思路】将调用Graphics2D的drawString方法替换为调用GraphHelper的drawString方法
feature/big-screen
Yvan 4 years ago
parent
commit
99374fd530
  1. 3
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

3
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -496,7 +496,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2); sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2);
g2d.setPaint(getForeground()); g2d.setPaint(getForeground());
g2d.drawString(sheetName, (int) textX + charWidth + 14, textAscent); // REPORT-40495 之前的g2d.drawString(),在windows下默认宋体时,无法绘制韩文字符,而GraphHelper的drawString中对韩文做了额外处理,可以绘制韩文字符
GraphHelper.drawString(g2d, sheetName, (int) textX + charWidth + 14, textAscent);
} }
/** /**

Loading…
Cancel
Save