From d6abbc268d02b416821942c8fd688fae40cb7bbf Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 10 Dec 2021 15:30:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/creator/XWAbsoluteLayout.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index 0de68f2de..5bec34d37 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -14,6 +14,7 @@ import com.fr.design.form.util.FormDesignerUtils; import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.mainframe.CoverReportPane; import com.fr.design.mainframe.EditingMouseListener; +import com.fr.design.mainframe.FormArea; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.form.ui.Connector; @@ -46,6 +47,7 @@ public class XWAbsoluteLayout extends XLayoutContainer { private int minHeight = WLayout.MIN_HEIGHT; private static final Color OUTER_BORDER_COLOR = new Color(65, 155, 249, 30); private static final Color INNER_BORDER_COLOR = new Color(65, 155, 249); + private static final double DEFAULT_CONTAINER_PERCENT = 1.0D; private HashMap xConnectorMap; @@ -177,8 +179,8 @@ public class XWAbsoluteLayout extends XLayoutContainer { */ @Override public void updateChildBound(int minHeight) { - double prevContainerPercent = FRScreen.getFRScreenByDimension(toData().getDesigningResolution()).getValue() / 100; - if (!AssistUtils.equals(1.0D, prevContainerPercent)) { + double prevContainerPercent = FRScreen.getFRScreenByDimension(toData().getDesigningResolution()).getValue() / FormArea.DEFAULT_SLIDER; + if (!AssistUtils.equals(DEFAULT_CONTAINER_PERCENT, prevContainerPercent)) { for (int i = 0; i < this.getComponentCount(); i++) { XCreator creator = getXCreator(i); Rectangle rec = new Rectangle(creator.getBounds());