Index: lams_flash/src/common/flash/org/lamsfoundation/lams/common/ui/AlertDialog.as =================================================================== diff -u -r90b4b10293f4b498a455ed8d89bb9b886b56d7b4 -rc5fcecd8ad5b7210e2f8f9f0f1b8d2d100f8d9bb --- lams_flash/src/common/flash/org/lamsfoundation/lams/common/ui/AlertDialog.as (.../AlertDialog.as) (revision 90b4b10293f4b498a455ed8d89bb9b886b56d7b4) +++ lams_flash/src/common/flash/org/lamsfoundation/lams/common/ui/AlertDialog.as (.../AlertDialog.as) (revision c5fcecd8ad5b7210e2f8f9f0f1b8d2d100f8d9bb) @@ -169,21 +169,19 @@ _okHandler = fn; var w = StringUtils.getButtonWidthForStr(lbl); - Debugger.log("width: " + w, Debugger.CRITICAL, "setCancelButton", "AlertDialog"); if(w > ok_btn.width) ok_btn.setSize(w, ok_btn.height); } public function setCancelButton(lbl:String,fn:Function){ - if(lbl != null) { + if(lbl != null) { cancel_btn.label = lbl; cancel_btn.visible = true; } _cancelHandler = fn; var w = StringUtils.getButtonWidthForStr(lbl); - Debugger.log("width: " + w, Debugger.CRITICAL, "setCancelButton", "AlertDialog"); if(w > cancel_btn.width) cancel_btn.setSize(w, cancel_btn.height); @@ -240,12 +238,11 @@ } else { - cancel_btn._x = _bgpanel._x + _bgpanel._width/2 - cancel_btn._width/2; - cancel_btn._y = _bgpanel._y + _bgpanel._height - ok_btn._height - 10; + cancel_btn._x = _bgpanel._x + _bgpanel._width/2 + 5; + cancel_btn._y = _bgpanel._y + _bgpanel._height - cancel_btn._height - 10; - ok_btn._x = _bgpanel._x + _bgpanel._width/2 - ok_btn._width/2; - ok_btn._y = cancel_btn._y - ok_btn._height - 5; - + ok_btn._x = _bgpanel._x + _bgpanel._width/2 - ok_btn._width; + ok_btn._y = _bgpanel._y + _bgpanel._height - ok_btn._height - 10; } Debugger.log("bg width: " + _bgpanel._width + " setting height: " + Math.round(Math.abs(_bgpanel._y) + Math.abs(ok_btn._y) + ok_btn._height), Debugger.CRITICAL, "type", "AlertDialog"); @@ -343,10 +340,11 @@ * Main resize method, called by scrollpane container/parent */ public function setSize(w:Number,h:Number):Void{ - _bgpanel._width = w; - _bgpanel._height = h; + _bgpanel._width = w; clickTarget._width = w; + + _bgpanel._height = h; clickTarget._height = h; }