Browse Source

Pull request #4975: REPORT-55214 & REPORT-55149

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

* commit '3108b10c7bae76cec12a7d8122760d958ec26b8a':
  REPORT-55149 【组件背景分离】组件复用-图表块没看到内边距设置项
  REPORT-55214 【组件背景分离】组件复用-组件编辑状态,蓝色实线边框感觉不太明显,和交互图预期效果不太一样;阴影效果看起来正常
zheng-1641779399395
starryi 3 years ago
parent
commit
5105e1a3da
  1. 10
      designer-form/src/main/java/com/fr/design/designer/beans/events/DesignerEditor.java
  2. 3
      designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java

10
designer-form/src/main/java/com/fr/design/designer/beans/events/DesignerEditor.java

@ -86,9 +86,15 @@ public class DesignerEditor<T extends JComponent> implements PropertyChangeListe
int horizonMargin = marginLeft + marginRight;
int verticalMargin = marginTop + marginBottom;
comp.setSize(new Dimension(size.width - 2 - horizonMargin, size.height - 2 - verticalMargin));
int x = 1 + marginLeft;
int y = 1 + marginTop;
int width = size.width - 2 - horizonMargin;
int height = size.height - 2 - verticalMargin;
comp.setSize(new Dimension(width, height));
LayoutUtils.layoutContainer(comp);
Graphics clipg = g.create(1 + marginLeft, 1 + marginTop, size.width, size.height);
comp.setBounds(comp.getX() + x, comp.getY() + y, width, height);
Graphics clipg = g.create(x, y, width, height);
this.comp.paint(clipg);
}
}

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

@ -146,6 +146,9 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
if (isEditing) {
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);
g.setColor(INNER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height), Constants.LINE_MEDIUM);
} else if (!isHovering) {
super.paintBorder(g, bounds);
}

Loading…
Cancel
Save