From 46bf22d0debcbb253e1e81b6500bcadaa057cf3d Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Sat, 17 Nov 2007 19:33:51 +0000 Subject: [PATCH] Native button text should not move in active state. b=381639 r=cbarrett sr=roc git-svn-id: svn://10.0.0.236/trunk@239586 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/cocoa/nsNativeThemeCocoa.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mozilla/widget/src/cocoa/nsNativeThemeCocoa.mm b/mozilla/widget/src/cocoa/nsNativeThemeCocoa.mm index e0c94c99908..b0371d67799 100644 --- a/mozilla/widget/src/cocoa/nsNativeThemeCocoa.mm +++ b/mozilla/widget/src/cocoa/nsNativeThemeCocoa.mm @@ -976,7 +976,7 @@ nsNativeThemeCocoa::GetWidgetBorder(nsIDeviceContext* aContext, case NS_THEME_BUTTON: // Top has a single pixel line, bottom has a single pixel line plus a single // pixel shadow. We say 2 for the sides so that text doesn't hit the border. - aResult->SizeTo(2, 1, 2, 3); + aResult->SizeTo(6, 1, 6, 3); break; case NS_THEME_DROPDOWN: @@ -1050,6 +1050,12 @@ nsNativeThemeCocoa::GetWidgetPadding(nsIDeviceContext* aContext, PRUint8 aWidgetType, nsMargin* aResult) { + // We don't want CSS padding being used for certain widgets. + // See bug 381639 for an example of why. + if (aWidgetType == NS_THEME_BUTTON) { + aResult->SizeTo(0, 0, 0, 0); + return PR_TRUE; + } return PR_FALSE; }