From 2409d627dc25bb223217b7adc6c0c72a5bda8afc Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 15 Dec 2023 18:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=B8=B8=E9=87=8F=E3=80=81=E6=94=B9?= =?UTF-8?q?=E5=91=BD=E5=90=8D=EF=BC=8C=E8=A1=A5=E5=85=85=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E4=B8=BB=E9=A2=98=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/panel/WidgetTextStylePane.java | 18 +++++++++--------- .../widgettheme/BaseStyleSettingPane.java | 4 ++-- .../widgettheme/ParaButtonSettingPane.java | 1 - 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java index 8223e6022..896b33c28 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java @@ -2,7 +2,7 @@ package com.fr.widgettheme.theme.panel; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.frpane.FontSizeComboPane; -import com.fr.widgettheme.theme.widget.style.TextStyle; +import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -39,16 +39,16 @@ public class WidgetTextStylePane extends JPanel { this.add(fontColorButton); } - public void setTextStyle(TextStyle textStyle) { - this.fontSizePane.setValue(textStyle.getFontSize()); - this.fontColorButton.setColor(textStyle.getFontColor()); + public void setTextStyle(ThemeTextStyle themeTextStyle) { + this.fontSizePane.setValue(themeTextStyle.getFontSize()); + this.fontColorButton.setColor(themeTextStyle.getFontColor()); } - public TextStyle getTextStyle() { - TextStyle textStyle = new TextStyle(); - textStyle.setFontSize(this.fontSizePane.getValue()); - textStyle.setFontColor(this.fontColorButton.getColor()); - return textStyle; + public ThemeTextStyle getTextStyle() { + ThemeTextStyle themeTextStyle = new ThemeTextStyle(); + themeTextStyle.setFontSize(this.fontSizePane.getValue()); + themeTextStyle.setFontColor(this.fontColorButton.getColor()); + return themeTextStyle; } public void setFontSizeValue(int fontSize) { 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 9e1e1eb4c..06c3f2488 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 @@ -3,7 +3,7 @@ package com.fr.design.widgettheme; import com.fr.base.theme.TemplateTheme; import com.fr.widgettheme.theme.panel.WidgetTextStylePane; import com.fr.widgettheme.theme.widget.style.BorderStyle; -import com.fr.widgettheme.theme.widget.style.TextStyle; +import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle; import com.fr.widgettheme.theme.bean.ButtonBackground; import com.fr.design.beans.BasicBeanPane; @@ -270,7 +270,7 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa borderRadiusSpinner.setValue(BorderStyle.DEFAULT_BORDER_RADIUS); } if (textStylePane != null) { - textStylePane.setTextStyle(new TextStyle()); + textStylePane.setTextStyle(new ThemeTextStyle()); } if (frFontPane != null) { frFontPane.populateBean(FRFont.getInstance()); diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java index 5933cbc15..0ba714d8d 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java @@ -2,7 +2,6 @@ package com.fr.design.widgettheme; import com.fr.design.widgettheme.common.ButtonSettingPane; import com.fr.form.ui.Widget; -import com.fr.widgettheme.theme.widget.style.TextStyle; import com.fr.widgettheme.theme.widget.theme.ParaButtonTheme; import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme;