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

231574, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@151611 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-01-20 23:57:40 +00:00
parent 3edff7d5b2
commit 393a35a481
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