From 708443c19c00c45cd62b53d5f0a31fdc9820f0aa Mon Sep 17 00:00:00 2001 From: Starryi Date: Sat, 28 Aug 2021 14:25:12 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58301=20=E3=80=90=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E3=80=91=E5=B8=83=E5=B1=80=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=EF=BC=8Cbody=E8=83=8C=E6=99=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=8D=E4=BF=9D=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 切换布局类型时,保留body背景样式 【改动思路】 同上 --- .../ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java | 7 +++++++ .../widget/ui/designer/layout/FRFitLayoutDefinePane.java | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java index 31291d748..769eb2944 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java @@ -27,6 +27,7 @@ import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBodyLayoutType; +import com.fr.form.ui.container.WFitLayout; import com.fr.general.act.BorderPacker; import com.fr.report.core.ReportUtils; @@ -173,6 +174,12 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { if (state == WBodyLayoutType.FIT.getTypeValue()) { XWFitLayout xwFitLayout = ((XWFitLayout)creator.getBackupParent()); xwFitLayout.switch2FitBodyLayout(creator); + WFitLayout wFitLayout = xwFitLayout.toData(); + // 切换布局类型时,保留body背景样式 + if (wFitLayout != null) { + wFitLayout.setBorderStyleFollowingTheme(layout.isBorderStyleFollowingTheme()); + wFitLayout.setBorderStyle(layout.getBorderStyle()); + } copyLayoutAttr(layout, xwFitLayout.toData()); } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 3e23b8050..af09f027c 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -215,9 +215,13 @@ public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane