Fixed html and input button to center and size correctly. #17474,#17353,#23270, #21249 -r Rod

This commit is contained in:
evaughan@netscape.com
2000-01-18 20:29:22 +00:00
parent b80db53e3b
commit 7344abdaca
7 changed files with 33 additions and 9 deletions

View File

@@ -619,10 +619,19 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext,
focusPadding.top + aReflowState.mComputedBorderPadding.top,
0, aStatus);
// center child vertically
nscoord yoff = 0;
if (aReflowState.mComputedHeight != NS_INTRINSICSIZE) {
yoff = (aReflowState.mComputedHeight - aDesiredSize.height)/2;
if (yoff < 0)
yoff = 0;
}
// Place the child
FinishReflowChild(firstKid, aPresContext, aDesiredSize,
focusPadding.left + aReflowState.mComputedBorderPadding.left,
focusPadding.top + aReflowState.mComputedBorderPadding.top, 0);
yoff + focusPadding.top + aReflowState.mComputedBorderPadding.top, 0);
#if 0 // old way
// if computed use the computed values.