|
|
|
@ -35,17 +35,16 @@ public class UIMenuItemUI extends BasicMenuItemUI {
|
|
|
|
|
|
|
|
|
|
g.setColor(UIConstants.NORMAL_BACKGROUND); |
|
|
|
|
g.fillRect(0, 0, menuWidth, menuHeight); |
|
|
|
|
int bidiX = BidiUtils.rtl() ? 10 : 30; |
|
|
|
|
int bidiWidth = BidiUtils.rtl() ? menuWidth - 35 : menuWidth - 30; |
|
|
|
|
int bidiX = BidiUtils.rtl() ? 5 : 30; |
|
|
|
|
if (menuItem.isOpaque()) { |
|
|
|
|
if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) { |
|
|
|
|
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, bidiWidth, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7); |
|
|
|
|
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7); |
|
|
|
|
} else { |
|
|
|
|
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, bidiWidth, menuHeight, true, Constants.NULL, menuItem.getBackground(), 7); |
|
|
|
|
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, menuItem.getBackground(), 7); |
|
|
|
|
} |
|
|
|
|
g.setColor(oldColor); |
|
|
|
|
} else if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) { |
|
|
|
|
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, bidiWidth, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7); |
|
|
|
|
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7); |
|
|
|
|
g.setColor(oldColor); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|