Set ascent/descent information so that vertical alignment works better

This commit is contained in:
kipp
1998-05-02 02:04:00 +00:00
parent 324fb84c83
commit 464cbe5d1e
7 changed files with 16 additions and 1 deletions

View File

@@ -401,6 +401,8 @@ nsInputButtonFrame::GetDesiredSize(nsIPresContext* aPresContext,
if (kButton_Hidden == GetButtonType()) { // there is no physical rep
aDesiredLayoutSize.width = 0;
aDesiredLayoutSize.height = 0;
aDesiredLayoutSize.ascent = 0;
aDesiredLayoutSize.descent = 0;
}
else {
nsSize styleSize;
@@ -444,6 +446,8 @@ nsInputButtonFrame::GetDesiredSize(nsIPresContext* aPresContext,
aDesiredLayoutSize.width = size.width;
aDesiredLayoutSize.height= size.height;
}
aDesiredLayoutSize.ascent = aDesiredLayoutSize.height;
aDesiredLayoutSize.descent = 0;
}
aDesiredWidgetSize.width = aDesiredLayoutSize.width;