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);