提交 ab8c4d84 编写于 作者: P peterz

6857360: NimbusLAF: Menu indicator looks ugly with RTL orientation.

Reviewed-by: rupashka
上级 5a9cd174
......@@ -84,6 +84,8 @@ class NimbusIcon extends SynthIcon {
translatex = 1;
}
}
} else if (c instanceof JMenu) {
flip = ! c.getComponentOrientation().isLeftToRight();
}
if (g instanceof Graphics2D){
Graphics2D gfx = (Graphics2D)g;
......
......@@ -718,10 +718,10 @@ public class MenuItemLayoutHelper {
}
private void alignRect(Rectangle rect, int alignment, int origWidth) {
if (alignment != SwingUtilities.LEFT) {
if (alignment == SwingConstants.RIGHT) {
rect.x = rect.x + rect.width - origWidth;
rect.width = origWidth;
}
rect.width = origWidth;
}
protected void layoutIconAndTextInLabelRect(LayoutResult lr) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册