Browse Source

Merge pull request #1388 in BA/design from ~MANGO/m_design:release/9.0 to release/9.0

* commit 'ffb075c5e10332225e1cf1944ddde6cd03cda476':
  代码优化
  CHART-1634  修改基本组件,添加灰化样式
master
superman 7 years ago
parent
commit
b6f3af0568
  1. 5
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

5
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -1,12 +1,9 @@
package com.fr.design.gui.ibutton; package com.fr.design.gui.ibutton;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.GlobalNameObserver;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import sun.swing.SwingUtilities2; import sun.swing.SwingUtilities2;
@ -200,7 +197,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
if (isPressed(b)) { if (isPressed(b)) {
g.setColor(Color.white); g.setColor(Color.white);
} else { } else {
g.setColor(Color.black); g.setColor(b.isEnabled() ? Color.black : UIConstants.LINE_COLOR);
} }
SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset()); SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset());

Loading…
Cancel
Save