diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java index e29548e57b..e7cfaff259 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java @@ -17,6 +17,8 @@ import java.awt.Toolkit; import java.awt.event.AWTEventListener; import java.awt.event.MouseEvent; +import static com.fine.theme.utils.FineUIScale.scale; + //august: public class FormWidgetPopWindow extends JWindow { private WidgetOption[] options; @@ -127,8 +129,8 @@ public class FormWidgetPopWindow extends JWindow { public Dimension preferredLayoutSize(Container parent) { Insets insets = parent.getInsets(); int nmembers = parent.getComponentCount(); - return new Dimension(maxLine * 28 + insets.left + insets.right + right + left, (nmembers / maxLine + 1) - * 24 + insets.top + insets.bottom + top + bottom); + return new Dimension(maxLine * scale(28) + insets.left + insets.right + scale(right) + scale(left), + (int) Math.ceil((float) nmembers / maxLine) * scale(26) + insets.top + insets.bottom + scale(top) + scale(bottom)); } @Override