From d1f5f4abfe02fc6b3670d853b13654743271ba60 Mon Sep 17 00:00:00 2001 From: vito Date: Mon, 3 Jun 2024 20:43:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-113994=20bugfix:=20flex=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=BA=94=E7=94=A8=E4=BF=AE=E5=A4=8D=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 19 +++++++++++++------ .../java/com/fr/design/widget/WidgetPane.java | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index e2b11c176c..8ac946f423 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -85,7 +85,15 @@ import javax.swing.Timer; import javax.swing.UIManager; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dialog; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; @@ -277,7 +285,7 @@ public class PreferencePane extends BasicPane { JPanel contentPane = this; contentPane.setLayout(FRGUIPaneFactory.createBorderLayout()); UITabbedPane tabPane = new UITabbedPane(); - contentPane.add(tabPane, BorderLayout.NORTH); + contentPane.add(tabPane, BorderLayout.CENTER); // 常用面板 JPanel generalPane = column(SETTING_V_GAP, // 功能设置 @@ -416,10 +424,9 @@ public class PreferencePane extends BasicPane { @NotNull private UIScrollPane patchScroll(JPanel generalPane) { - JPanel wrapperPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - wrapperPane.add(generalPane); - wrapperPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); - return new UIScrollPane(wrapperPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + UIScrollPane uiScrollPane = new UIScrollPane(generalPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + uiScrollPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); + return uiScrollPane; } private void createVcsSettingPane(JPanel generalPane, JPanel parentPane, CardLayout cardLayout) { diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java index 9cbcc66b8d..80ba33ef26 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java @@ -81,7 +81,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener this.add(column( 10, cell(northPane), - cell(cellEditorCardPane) + cell(cellEditorCardPane).weight(1) ).getComponent() ); }