removed some warnings and made gfx text control ignore the extra padding from nsILookAndFeel which is for native wdiegst

git-svn-id: svn://10.0.0.236/trunk@45336 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
1999-08-31 12:59:09 +00:00
parent 4605d814f6
commit 02ad25efb5
2 changed files with 8 additions and 8 deletions

View File

@@ -308,12 +308,12 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
if (PR_TRUE == requiresWidget || eWidgetRendering_Native == mode ||
type==NS_FORM_INPUT_TEXT || type==NS_FORM_TEXTAREA || type==NS_FORM_INPUT_PASSWORD)
{
if (!aWidthExplicit) {
if (!aWidthExplicit && mode == eWidgetRendering_Native) {
PRInt32 hPadding = (2 * aFrame->GetHorizontalInsidePadding(*aPresContext, p2t, aDesiredSize.width, charWidth));
aDesiredSize.width += hPadding;
aMinSize.width += hPadding;
}
if (!aHeightExplicit) {
if (!aHeightExplicit && mode == eWidgetRendering_Native) {
PRInt32 vPadding = (2 * aFrame->GetVerticalInsidePadding(p2t, aRowHeight));
aDesiredSize.height += vPadding;
aMinSize.height += vPadding;
@@ -666,8 +666,8 @@ nsFormControlHelper::PaintCheckMark(nsIRenderingContext& aRenderingContext,
float aPixelsToTwips, const nsRect & aRect)
{
// Width and height of the fixed size checkmark in TWIPS.
const PRUint32 fixedSizeCheckmarkWidth = 165;
const PRUint32 fixedSizeCheckmarkHeight = 165;
const PRInt32 fixedSizeCheckmarkWidth = 165;
const PRInt32 fixedSizeCheckmarkHeight = 165;
if ((fixedSizeCheckmarkWidth == aRect.width) &&
(fixedSizeCheckmarkHeight == aRect.height)) {

View File

@@ -308,12 +308,12 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
if (PR_TRUE == requiresWidget || eWidgetRendering_Native == mode ||
type==NS_FORM_INPUT_TEXT || type==NS_FORM_TEXTAREA || type==NS_FORM_INPUT_PASSWORD)
{
if (!aWidthExplicit) {
if (!aWidthExplicit && mode == eWidgetRendering_Native) {
PRInt32 hPadding = (2 * aFrame->GetHorizontalInsidePadding(*aPresContext, p2t, aDesiredSize.width, charWidth));
aDesiredSize.width += hPadding;
aMinSize.width += hPadding;
}
if (!aHeightExplicit) {
if (!aHeightExplicit && mode == eWidgetRendering_Native) {
PRInt32 vPadding = (2 * aFrame->GetVerticalInsidePadding(p2t, aRowHeight));
aDesiredSize.height += vPadding;
aMinSize.height += vPadding;
@@ -666,8 +666,8 @@ nsFormControlHelper::PaintCheckMark(nsIRenderingContext& aRenderingContext,
float aPixelsToTwips, const nsRect & aRect)
{
// Width and height of the fixed size checkmark in TWIPS.
const PRUint32 fixedSizeCheckmarkWidth = 165;
const PRUint32 fixedSizeCheckmarkHeight = 165;
const PRInt32 fixedSizeCheckmarkWidth = 165;
const PRInt32 fixedSizeCheckmarkHeight = 165;
if ((fixedSizeCheckmarkWidth == aRect.width) &&
(fixedSizeCheckmarkHeight == aRect.height)) {