From 37e8e433ff377d8873b64178a7648495c7974e4a Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 21 Dec 2023 19:46:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=91=E6=8F=90=E4=B8=80=E4=B8=AA=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/edit/widget/WidgetStyleEditPane.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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 92300b00b9..1c8ab2ff14 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 @@ -3,6 +3,8 @@ package com.fr.widgettheme.theme.edit.widget; import com.fr.base.theme.TemplateTheme; import com.fr.design.beans.BasicBeanPane; import com.fr.design.designer.IntervalConstants; +import com.fr.design.gui.frpane.FontSizeComboPane; +import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; @@ -13,8 +15,8 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.NewColorSelectBox; import com.fr.stable.StringUtils; -import com.fr.widgettheme.theme.panel.WidgetTextStylePane; import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; +import com.fr.widgettheme.util.ThemeTextStylePaneCreator; import org.jetbrains.annotations.Nullable; import javax.swing.BorderFactory; @@ -42,7 +44,9 @@ public class WidgetStyleEditPane extends BasicBeanPane< /** * 文本样式面板 */ - protected WidgetTextStylePane textStylePane; + protected FontSizeComboPane fontSizePane; + + protected UIColorButton fontColorButton; public WidgetStyleEditPane() { initComponents(); @@ -72,7 +76,7 @@ public class WidgetStyleEditPane extends BasicBeanPane< new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), textStylePane} + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), ThemeTextStylePaneCreator.create(fontSizePane, fontColorButton)} }; } @@ -81,12 +85,12 @@ public class WidgetStyleEditPane extends BasicBeanPane< colorSelectBox.setSelectObject(WidgetThemeDisplayConstants.DEFAULT_THEME_COLOR); initLineBox(); borderRadiusSpinner = new UISpinner(0, Integer.MAX_VALUE, 1); - initTextStylePane(); - textStylePane.setFontSizeValue(16); + initFontSizePane(); + fontColorButton = new UIColorButton(); } - protected void initTextStylePane() { - textStylePane = new WidgetTextStylePane(FRFontPane.getFontSizes(), WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH); + protected void initFontSizePane() { + fontSizePane = new FontSizeComboPane(FRFontPane.getFontSizes()); } /**