Make button baselines take into account the vertical centering we do. Bug

231574, r+sr=dbaron
This commit is contained in:
bzbarsky@mit.edu
2004-01-20 23:57:40 +00:00
parent 911cdac284
commit bb8eeac181
2 changed files with 8 additions and 0 deletions

View File

@@ -581,6 +581,10 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsIPresContext* aPresContext,
yoff = (minInternalHeight - aDesiredSize.height) / 2;
}
// Adjust the ascent by our offset (since we moved the child's
// baseline by that much).
aDesiredSize.ascent += yoff;
// Place the child. If we have a non-intrinsic width, we want to
// reduce the left padding as needed to try and fit the text in the
// button