@@ -1687,11 +1687,8 @@ protected Dimension setHTMLSize1(DOMNode node, boolean addCSS, boolean usePrefer
16871687 // setting here
16881688
16891689 if (!isMenuItem ) {
1690- @ SuppressWarnings ("unused" )
16911690 boolean simpleButton = isSimpleButton ;
1692- @ SuppressWarnings ("unused" )
16931691 DOMNode centerNode = centeringNode ;
1694- @ SuppressWarnings ("unused" )
16951692 DOMNode dnode = domNode ;
16961693 /**
16971694 * @j2sNative
@@ -2661,9 +2658,9 @@ protected void setAlignments(AbstractButton b, boolean justGetPreferred) {
26612658 if (isFullyCentered ) {
26622659 // simple totally centered label or button
26632660 // can't have width or height here --- let the browser figure that out
2664- fullyCenter (cssCtr );
2665- fullyCenter (cssIcon );
2666- fullyCenter (cssTxt );
2661+ fullyCenter (cssCtr , isSimpleButton || isLabel );
2662+ fullyCenter (cssIcon , isSimpleButton );
2663+ fullyCenter (cssTxt , isSimpleButton );
26672664 } else {
26682665
26692666 // horizontal
@@ -2795,8 +2792,8 @@ protected void setAlignments(AbstractButton b, boolean justGetPreferred) {
27952792 updateCellNode ();
27962793 }
27972794
2798- private void fullyCenter (Object css ) {
2799- if (isSimpleButton )
2795+ private void fullyCenter (Object css , boolean noOffsets ) {
2796+ if (noOffsets )
28002797 addJSKeyVal (css , "width" , null , "position" , null , "padding" , "0" , "margin" , "0 auto" );
28012798 else
28022799 addJSKeyVal (css , "width" , null , "top" , "50%" , "left" , "50%" , "transform" ,
0 commit comments