Browse Source

Pull request #5091: REPORT-55753 【组件背景分离】组件复用-工具栏的显示位置不超过绘制区域

Merge in DESIGN/design from ~HADES/design:final/10.0 to final/10.0

* commit '9de0d420d48693aefd9822fb9ef01345413f7b2e':
  REPORT-55753 【组件背景分离】组件复用-工具栏的显示位置不超过绘制区域
final/10.0
Kara 3 years ago
parent
commit
9cd6db5941
  1. 9
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

9
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -776,8 +776,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
if (popup == null) { if (popup == null) {
popup = new SelectedPopupDialog(this, designer); popup = new SelectedPopupDialog(this, designer);
} }
int extraX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale()); int creatorRightX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale());
int extraY = (int) (bounds.y * designer.getScale()); int creatorRightY = (int) (bounds.y * designer.getScale());
int formDesignerWidth = designer.getWidth();
int formDesignerHeight = designer.getHeight();
// 不超过可绘制区域
int extraX = Math.min(creatorRightX, formDesignerWidth);
int extraY = creatorRightY < 0 ? 0 : Math.min(creatorRightY, formDesignerHeight);
// 放到事件尾部执行 // 放到事件尾部执行
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override @Override

Loading…
Cancel
Save