Browse Source

REPORT-55214 【组件背景分离】组件复用-组件编辑状态,蓝色实线边框感觉不太明显,和交互图预期效果不太一样;阴影效果看起来正常

【问题原因】
编辑时的内边框之前在XChartEditor的paintForeground里绘制,会被圆角效果裁剪

【改动思路】
编辑时的内边框放在paintBorder(Graphics g, Rectangle bounds)中绘制,该方法由
FormDesigner调用,不受组件内部影响
zheng-1641779399395
Starryi 3 years ago
parent
commit
eebc59f53f
  1. 3
      designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java

3
designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java

@ -146,6 +146,9 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
if (isEditing) { if (isEditing) {
g.setColor(OUTER_BORDER_COLOR); g.setColor(OUTER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 1, bounds.height + BORDER_WIDTH + 1), Constants.LINE_LARGE); GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 1, bounds.height + BORDER_WIDTH + 1), Constants.LINE_LARGE);
g.setColor(INNER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height), Constants.LINE_MEDIUM);
} else if (!isHovering) { } else if (!isHovering) {
super.paintBorder(g, bounds); super.paintBorder(g, bounds);
} }

Loading…
Cancel
Save