Skip to content

Commit 9af9b1f

Browse files
committed
checkbox in table should be fully centered
1 parent 392433b commit 9af9b1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,9 +2680,9 @@ protected void setAlignments(AbstractButton b, boolean justGetPreferred) {
26802680
"height", hCtr + "px");
26812681
addJSKeyVal(cssIcon, "position", "absolute", "top", null, "left", null, "transform", null);
26822682
addJSKeyVal(cssTxt, "position", "absolute", "top", null, "left", null, "transform", null);
2683-
// checkboxes and radiobuttons should not be fully centered
2683+
// checkboxes and radiobuttons (i.e. with actionNodes) should not be fully centered unless in a table
26842684
isFullyCentered = (alignHCenter && alignVCenter && wIcon == 0
2685-
|| wText == 0 && (actionNode == null || isSimpleButton) && margins.left == margins.right
2685+
|| wText == 0 && (actionNode == null || this.cellComponent != null || isSimpleButton) && margins.left == margins.right
26862686
&& margins.top == margins.bottom && myInsets.left == myInsets.right && myInsets.top == myInsets.bottom);
26872687
if (isFullyCentered) {
26882688
// simple totally centered label or button

0 commit comments

Comments
 (0)