Browse Source

REPORT-100623 控件-参数面板根据参数自动生成的控件,页面放大后无法点击

newui
obo 1 year ago
parent
commit
5aad600fee
  1. 2
      designer-form/src/main/java/com/fr/design/designer/creator/XEditorHolder.java
  2. 6
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

2
designer-form/src/main/java/com/fr/design/designer/creator/XEditorHolder.java

@ -46,7 +46,7 @@ public class XEditorHolder extends XWidgetCreator {
Rectangle rect = this.getBounds();
int min = rect.x + rect.width / 2 - editingMouseListener.getMinMoveSize();
int max = rect.x + rect.width / 2 + editingMouseListener.getMinMoveSize();
if (e.getX() > min && e.getX() < max) {
if (e.getX() + editingMouseListener.getDesigner().getHorizontalScaleValue() > min && e.getX() + editingMouseListener.getDesigner().getHorizontalScaleValue() < max) {
ToolTipEditor.getInstance().showToolTip((XEditorHolder) this, e.getXOnScreen(),
e.getYOnScreen());
}

6
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -281,7 +281,7 @@ public class EditingMouseListener extends MouseInputAdapter {
Rectangle rect = xcreator.getBounds();
int min = rect.x + rect.width / 2 - minMoveSize;
int max = rect.x + rect.width / 2 + minMoveSize;
if (e.getX() > min && e.getX() < max) {
if (e.getX() + designer.getHorizontalScaleValue() > min && e.getX() + designer.getHorizontalScaleValue() < max) {
if (designer.getCursor().getType() != Cursor.HAND_CURSOR) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
@ -673,8 +673,8 @@ public class EditingMouseListener extends MouseInputAdapter {
currentEditor = designerEditor;
currentXCreator = creator;
Rectangle bounds = new Rectangle(1, 1, creator.getWidth() - 2, creator.getHeight() - 2);
bounds.x += (rect.x - designer.getArea().getHorizontalValue());
bounds.y += (rect.y - designer.getArea().getVerticalValue());
bounds.x += (rect.x - designer.getHorizontalScaleValue());
bounds.y += (rect.y - designer.getVerticalScaleValue());
designerEditor.getEditorTarget().setBounds(bounds);
designer.add(designerEditor.getEditorTarget());
designer.invalidate();

Loading…
Cancel
Save