From f439e775363e36e222da1ca23cd63522becd0c34 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 25 Oct 2017 18:47:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-1634=20=20=E4=BF=AE=E6=94=B9=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=81=B0?= =?UTF-8?q?=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/ibutton/UIButtonGroup.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index a8ad8f0956..46a281f02d 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -200,7 +200,11 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { if (isPressed(b)) { g.setColor(Color.white); } else { - g.setColor(Color.black); + if (b.isEnabled()) { + g.setColor(Color.black); + } else { + g.setColor(UIConstants.LINE_COLOR); + } } SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset()); From ffb075c5e10332225e1cf1944ddde6cd03cda476 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 25 Oct 2017 19:06:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/ibutton/UIButtonGroup.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index 46a281f02d..76828e38e7 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -1,12 +1,9 @@ package com.fr.design.gui.ibutton; -import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.ArrayUtils; -import com.fr.stable.Constants; import com.fr.stable.StringUtils; import sun.swing.SwingUtilities2; @@ -200,11 +197,7 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { if (isPressed(b)) { g.setColor(Color.white); } else { - if (b.isEnabled()) { - g.setColor(Color.black); - } else { - g.setColor(UIConstants.LINE_COLOR); - } + g.setColor(b.isEnabled() ? Color.black : UIConstants.LINE_COLOR); } SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset());