From aa5997815a5958f89f9e6c2f7d246e8d6c6101f4 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 12 Oct 2017 14:23:58 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=3D>=E8=A1=A8=E5=8D=95=3D=E3=80=8B=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=BA=93=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/ibutton/UIButton.java | 1 + .../com/fr/design/gui/ibutton/UIButtonUI.java | 2 +- .../design/mainframe/FormWidgetDetailPane.java | 16 ++++------------ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIButton.java index 91602372da..1fb2ec70ca 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButton.java @@ -79,6 +79,7 @@ public class UIButton extends JButton implements UIObserver { setPressedIcon(pressed); setExtraPainted(false); setBackground(null); + setForeground(UIConstants.FONT_COLOR); setOpaque(false); initListener(); } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java index a93841ff32..4833597ee2 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -80,7 +80,7 @@ public class UIButtonUI extends BasicButtonUI { FontMetrics fm = SwingUtilities2.getFontMetrics(b, g); int mnemonicIndex = b.getDisplayedMnemonicIndex(); if (b.isEnabled()) { - g.setColor(UIConstants.FONT_COLOR); + g.setColor(b.getForeground()); } else { g.setColor(UIConstants.LINE_COLOR); } diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 83f2b057fe..d53bc04d5d 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -2,17 +2,12 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.base.FRContext; -import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.imenu.UIMenuItem; -import com.fr.design.gui.imenu.UIPopupMenu; -import com.fr.design.icon.IconPathConstants; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.share.ShareLoader; import com.fr.form.ui.ElCaseBindInfo; import com.fr.general.FRLogger; @@ -196,10 +191,8 @@ public class FormWidgetDetailPane extends FormDockView{ resetPanel = new JPanel(); resetButton = new UIButton(Inter.getLocText("FR-Designer_Reset")); resetPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); - resetButton.set4ToolbarButton(); - resetButton.setOpaque(true); - resetButton.setBackground(new Color(184, 220, 242)); - resetButton.setForeground(Color.WHITE); + resetButton.setBackground(Color.white); + resetButton.setForeground(new Color(0x333334)); resetButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -210,9 +203,8 @@ public class FormWidgetDetailPane extends FormDockView{ }); deleteButton = new UIButton(Inter.getLocText("FR-Designer_Remove_Item")); - deleteButton.set4ToolbarButton(); - deleteButton.setOpaque(true); - deleteButton.setBackground(Color.red); + deleteButton.setBackground(Color.white); + deleteButton.setForeground(new Color(0xeb1d1f)); deleteButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {