The button was being sized wrong, so the computed border padding needed to be removed beforehand and then is added back in later by layout

This commit is contained in:
rods@netscape.com
1999-08-19 14:00:09 +00:00
parent c8699c63f1
commit a917dba21a
2 changed files with 4 additions and 0 deletions

View File

@@ -176,10 +176,12 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext& aPresContext,
// Honor the suggested width and/or height.
if (kSuggestedNotSet != mSuggestedWidth) {
suggestedReflowState.mComputedWidth = mSuggestedWidth;
suggestedReflowState.mComputedWidth -= aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right;
}
if (kSuggestedNotSet != mSuggestedHeight) {
suggestedReflowState.mComputedHeight = mSuggestedHeight;
suggestedReflowState.mComputedHeight -= aReflowState.mComputedBorderPadding.top + aReflowState.mComputedBorderPadding.bottom;
}
return nsHTMLButtonControlFrame::Reflow(aPresContext, aDesiredSize, suggestedReflowState, aStatus);