small change to make it behave like nsCheckboxControlFrame when the WidgetRenderingMode is not initialized.

This commit is contained in:
pierre%netscape.com 1999-03-08 04:46:12 +00:00
parent d55deef772
commit 242e870001

View File

@ -105,7 +105,10 @@ nsRadioControlFrame::GetDesiredSize(nsIPresContext* aPresContext,
nsWidgetRendering mode;
aPresContext->GetWidgetRenderingMode(&mode);
if (eWidgetRendering_Native == mode) {
if (eWidgetRendering_Gfx == mode) {
nsFormControlFrame::GetDesiredSize(aPresContext,aReflowState,aDesiredLayoutSize,
aDesiredWidgetSize);
} else {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
aDesiredWidgetSize.width = GetRadioboxSize(p2t);
@ -119,9 +122,6 @@ nsRadioControlFrame::GetDesiredSize(nsIPresContext* aPresContext,
aDesiredLayoutSize.maxElementSize->width = aDesiredLayoutSize.width;
aDesiredLayoutSize.maxElementSize->height = aDesiredLayoutSize.height;
}
} else {
nsFormControlFrame::GetDesiredSize(aPresContext,aReflowState,aDesiredLayoutSize,
aDesiredWidgetSize);
}
}