From 6ef55ce5712ebc43b06e49a3a372267ccd265d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Fri, 25 Oct 2024 09:14:46 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-138690=20fix:=20=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E5=B7=A5=E5=85=B7=E6=9D=A1?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E5=85=83=E7=B4=A0=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/cell/editor/RichTextToolBar.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java index 675e4eebf3..2843751aeb 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java @@ -108,7 +108,7 @@ public class RichTextToolBar extends BasicPane { fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontSizeComboBox = new UIComboBox(FRFontPane.getFontSizes()); colorSelectPane = new UIToolbarColorButton(new LazyIcon("foreground")); - colorSelectPane.set4Toolbar(); + setColorSelectPaneStyle(); bold = new UIToggleButton(new LazyIcon("bold")); italic = new UIToggleButton(new LazyIcon("italic")); @@ -127,10 +127,19 @@ public class RichTextToolBar extends BasicPane { bindListener(); } + private void setColorSelectPaneStyle() { + colorSelectPane.set4Toolbar(); + if (colorSelectPane.getLeftButton() != null && colorSelectPane.getRightButton() != null) { + colorSelectPane.getLeftButton().setBackground(null); + colorSelectPane.getRightButton().setBackground(null); + } + } + private void addIntoToolBar() { toolbar.add(bold); toolbar.add(italic); toolbar.add(underline); + toolbar.add(colorSelectPane); toolbar.add(subPane); toolbar.add(superPane); toolbar.add(formulaPane);