Skip to content

Commit dd02ec7

Browse files
committed
menuitem anchor node from 95% to 90% width
1 parent 868ea59 commit dd02ec7

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSComponentUI.java

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ protected void addJQueryFocusCallbacks() {
10381038
* @j2sNative
10391039
*
10401040
* node.focus(function(e) {
1041-
* //System.out.println("JSSCUI node.focus() callback " + me.id + " " + document.activeElement.id);
1041+
* //System.out.println("JSSCUI node.focus() callback " + me.id + " " + document.activeElement.id + " " + me.ignoreFocus);
10421042
* if (!me.ignoreFocus)
10431043
* me.handleJSFocus$O$O$Z(me.jc, e.relatedTarget, true);
10441044
* me.ignoreFocus = false;
@@ -1108,9 +1108,9 @@ public void abstractButtonFocusHack() {
11081108
/**
11091109
* for SetMouse check
11101110
*/
1111-
protected final static boolean HANDLED = true;
1112-
protected final static boolean NOT_HANDLED = false;
1113-
1111+
public final static boolean HANDLED = true;
1112+
public final static boolean NOT_HANDLED = false;
1113+
11141114
protected static final int SOME_MOUSE_EVENT = -1;
11151115
protected static final int SOME_KEY_EVENT = -2;
11161116

@@ -2647,8 +2647,8 @@ protected void setAlignments(AbstractButton b, boolean justGetPreferred) {
26472647
}
26482648
}
26492649
if (!isMenu || isMenuItem)
2650-
DOMNode.setStyles(menuAnchorNode, "width", "95%", "min-width",
2651-
Math.max(75, (wCtr + wAccel + margins.left + margins.right) * 1.1) + "px");
2650+
DOMNode.setStyles(menuAnchorNode, "width", "90%", "min-width",
2651+
Math.max(75, (wCtr + wAccel + margins.left + margins.right) * 1.1) + "px"); // was 95%, but then the blue background extends past right end of menu item
26522652
}
26532653

26542654
if (alignHCenter) {
@@ -3522,18 +3522,10 @@ public void clearPaintPath() {
35223522
*/
35233523
public boolean isTextView;
35243524

3525-
3526-
35273525
public boolean isModalBlocked() {
35283526
return JSComponent.秘getTopInvokableAncestor(jc, false).秘getUI().modalBlocked;
35293527
}
35303528

3531-
3532-
public boolean processKeyEvent(KeyEvent e) {
3533-
return NOT_HANDLED;
3534-
}
3535-
3536-
35373529
public boolean isDisplayable() {
35383530
return domNode != null;
35393531
}

0 commit comments

Comments
 (0)