From 964a83d165310693ff6d6c08880b231807f79a8a Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 29 Mar 2024 17:05:50 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E6=8A=A5=E8=A1=A8=E5=9D=97=E9=80=82?= =?UTF-8?q?=E9=85=8Dfvs=E6=B7=B1=E6=B5=85=E8=89=B2=E4=B8=BB=E9=A2=98=20#RE?= =?UTF-8?q?PORT-116912?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utils/gui/AdjustWorkBookDefaultStyleUtils.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java index c3c087b4db..4bc1794561 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java @@ -18,13 +18,23 @@ public class AdjustWorkBookDefaultStyleUtils { private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43); private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110); private static final Color CELL_ELEMENT_FONT_FOREGROUND = Color.WHITE; + private static final Color CELL_ELEMENT_FONT_FOREGROUND_4_LIGHT_THEME = Color.BLACK; private static Color currentStoryBack = null; + private static boolean isDarkTheme = true; public static void setCurrentStoryBack(Color color) { currentStoryBack = color; } + public static void setIsDarkTheme(boolean isDarkTheme) { + AdjustWorkBookDefaultStyleUtils.isDarkTheme = isDarkTheme; + } + + private static Color getCellForegroundColor() { + return isDarkTheme ? CELL_ELEMENT_FONT_FOREGROUND : CELL_ELEMENT_FONT_FOREGROUND_4_LIGHT_THEME; + } + private static Color getCurrentStoryBack() { return currentStoryBack == null ? TEMPLATE_BACKGROUND : currentStoryBack; } @@ -39,7 +49,7 @@ public class AdjustWorkBookDefaultStyleUtils { public static Style adjustCellElement(Style style) { if (DesignModeContext.isDuchampMode()) { - style = style.deriveFRFont(style.getFRFont().applyForeground(CELL_ELEMENT_FONT_FOREGROUND)); + style = style.deriveFRFont(style.getFRFont().applyForeground(getCellForegroundColor())); style = style.deriveBorder(0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER, @@ -49,7 +59,7 @@ public class AdjustWorkBookDefaultStyleUtils { } public static Color adjustCellElementFontForeground(Color color) { - return DesignModeContext.isDuchampMode() ? CELL_ELEMENT_FONT_FOREGROUND : color; + return DesignModeContext.isDuchampMode() ? getCellForegroundColor() : color; } public static void adjustFloatElement(FloatElement floatElement) { From 9baa4f112ec009ab3a12f0bf656367c3e1d5c825 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Tue, 2 Apr 2024 20:01:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-116327=20=E6=9D=A1=E7=A0=81=E5=A2=9E?= =?UTF-8?q?=E5=BC=BA=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=96=B0=E5=BB=BA=E6=9D=A1?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E6=9D=A1=E7=A0=81=E7=9A=84=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BC=9A=E8=B7=9F=E9=9A=8F=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=9D=A1=E7=A0=81=E5=8F=98?= =?UTF-8?q?=E5=8C=96=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E4=B8=BA=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E5=88=B7=E6=96=B0=E6=8F=92=E4=BB=B6=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=8F=92=E4=BB=B6=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=E9=85=8D=E7=BD=AE=E6=B2=A1=E6=9C=89=E8=A2=AB?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D?= =?UTF-8?q?=E8=B7=AF=E3=80=91=E9=87=8D=E7=BD=AE=E6=89=80=E6=9C=89=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/present/PresentPane.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/present/PresentPane.java b/designer-realize/src/main/java/com/fr/design/present/PresentPane.java index 8e8a669c9f..95d45fa45d 100644 --- a/designer-realize/src/main/java/com/fr/design/present/PresentPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/PresentPane.java @@ -52,10 +52,9 @@ public class PresentPane extends UIComboBoxPane { @Override public void populateBean(Present ob) { if(ob == null) { - dictPresentPane.reset(); - formulaPresentPane.reset(); - barCodePane.reset(); - currencyLinePane.reset(); + for (FurtherBasicBeanPane pane : cards) { + pane.reset(); + } } super.populateBean(ob); } From 9c5b553a686ffc53a820e2a5e70a8c9a0ad1709b Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Wed, 3 Apr 2024 17:19:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=8BUI?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/edit/widget/DesktopWidgetStyleEditPane.java | 9 +++++++-- .../theme/edit/widget/WidgetStyleEditPane.java | 2 ++ .../com/fr/design/widgettheme/BaseStyleSettingPane.java | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java index 69cedccd49..4af7b9b6d1 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java @@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.utils.DesignUtils; +import com.fr.design.widget.FRWidgetFactory; import com.fr.locale.InterProviderFactory; import com.fr.stable.StringUtils; import com.fr.util.ColorUtils; @@ -55,7 +56,8 @@ public class DesktopWidgetStyleEditPane extends WidgetS initSelectBackgroundColorBox(); initFontNameSelectBox(); return new Component[][]{ - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, new Component[]{WidgetThemeDesignerUtils.createTopAlignmentLabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Widget_Background")), initBackGroundComponent()}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, + new Component[]{WidgetThemeDesignerUtils.createTopAlignmentLabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Widget_Background")), initBackGroundComponent()}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox}, new Component[]{null, lineComboColorSelectBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, @@ -67,7 +69,10 @@ public class DesktopWidgetStyleEditPane extends WidgetS } private Column initBackGroundComponent() { - return column(10, cell(widgetBgColorSelectBox), cell(widgetBgAlphaDragPane)).getComponent(); + return column(10, + cell(widgetBgColorSelectBox), + cell(FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))), + cell(widgetBgAlphaDragPane)).getComponent(); } private void initSelectBackgroundColorBox() { diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java index 39389469a6..bf6ad6c4fd 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java @@ -18,6 +18,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.NewColorSelectBox; +import com.fr.design.widget.FRWidgetFactory; import com.fr.general.IOUtils; import com.fr.stable.StringUtils; import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; @@ -120,6 +121,7 @@ public class WidgetStyleEditPane extends BasicBeanPane< private Column initBackGroundComponent() { return column(10, cell(widgetBgColorSelectBox), + cell(FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))), cell(widgetBgAlphaDragPane) ).getComponent(); } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java index a06a872bf1..14183ed2e6 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java @@ -23,6 +23,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.utils.DesignUtils; +import com.fr.design.widget.FRWidgetFactory; import com.fr.form.ui.Widget; import com.fr.general.FRFont; import com.fr.general.IOUtils; @@ -164,6 +165,7 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa return column( 10, cell(widgetBgColorSelectBox), + cell(FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))), cell(widgetBgAlphaDragPane) ).getComponent(); } From 0843a998fc6f5b3b720838b7255e3f56833cc2b1 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Wed, 3 Apr 2024 17:21:45 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-116410=20=E6=96=B0=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E9=85=8D=E7=BD=AE=E9=A1=B9=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=91=E6=96=B0=E5=A4=9A=E9=80=89=E4=B8=8B=E6=8B=89=E6=A0=91?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E5=BD=93=E4=BD=9C=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E4=BA=86=EF=BC=8C=E5=B0=91=E4=BA=86=E4=BA=9B=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B8=8B=E6=8B=89=E6=A1=86=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/WidgetThemeCreatorPaneAdder.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java b/designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java index 1e36b42e0e..b2e3b70a86 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java @@ -1,8 +1,11 @@ package com.fr.design.widgettheme.processor; -import com.fr.design.widgettheme.common.SelectEditorSettingPane; -import com.fr.widgettheme.util.WidgetThemeDesignerUtils; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.widgettheme.common.ButtonSettingPane; +import com.fr.design.widgettheme.common.EditorSettingPane; +import com.fr.design.widgettheme.common.NormalButtonSettingPane; +import com.fr.design.widgettheme.common.SelectEditorSettingPane; +import com.fr.design.widgettheme.common.TreeEditorSettingPane; import com.fr.form.parameter.FormSubmitButton; import com.fr.form.ui.Button; import com.fr.form.ui.CheckBox; @@ -21,10 +24,7 @@ import com.fr.form.ui.TreeEditor; import com.fr.report.web.button.form.TreeNodeToggleButton; import com.fr.report.web.button.write.AppendRowButton; import com.fr.report.web.button.write.DeleteRowButton; -import com.fr.design.widgettheme.common.ButtonSettingPane; -import com.fr.design.widgettheme.common.EditorSettingPane; -import com.fr.design.widgettheme.common.NormalButtonSettingPane; -import com.fr.design.widgettheme.common.TreeEditorSettingPane; +import com.fr.widgettheme.util.WidgetThemeDesignerUtils; import com.fr.widgettheme.utils.WidgetThemeServerUtils; import java.util.Arrays; @@ -97,7 +97,7 @@ public class WidgetThemeCreatorPaneAdder { } private static void acceptEditor(Class creator, List> extraPaneList) { - boolean accept = WidgetThemeServerUtils.isNewComboBoxTreeEditor(creator) || EDITOR_SET.contains(creator); + boolean accept = EDITOR_SET.contains(creator); if (accept) { insertShortCut(extraPaneList, new EditorSettingPane<>()); } @@ -126,7 +126,7 @@ public class WidgetThemeCreatorPaneAdder { } private static void acceptSelect(Class creator, List> extraPaneList) { - boolean accept = SELECT_SET.contains(creator); + boolean accept = WidgetThemeServerUtils.isNewComboBoxTreeEditor(creator) || SELECT_SET.contains(creator); if (accept) { insertShortCut(extraPaneList, new SelectEditorSettingPane<>()); }