From 556bc53589b756563683c63d770bd1a39e1a67fd Mon Sep 17 00:00:00 2001 From: "masayuki%d-toybox.com" Date: Tue, 18 Sep 2007 09:17:51 +0000 Subject: [PATCH] Bug 395565 spinner of cocoa has wrong size r=josh+enndeakin, sr+a=roc --- toolkit/themes/pinstripe/global/spinbuttons.css | 10 ++++++---- widget/src/cocoa/nsNativeThemeCocoa.mm | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/toolkit/themes/pinstripe/global/spinbuttons.css b/toolkit/themes/pinstripe/global/spinbuttons.css index 42148a6f665..7c6c0220fae 100644 --- a/toolkit/themes/pinstripe/global/spinbuttons.css +++ b/toolkit/themes/pinstripe/global/spinbuttons.css @@ -14,12 +14,12 @@ * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is - * Håkan Waara Portions created by Håkan Waara are Copyright (C) Håkan Waara. All Rights Reserved. + * HÃ¥kan Waara Portions created by HÃ¥kan Waara are Copyright (C) HÃ¥kan Waara. All Rights Reserved. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Håkan Waara (Original Author) + * HÃ¥kan Waara (Original Author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -47,7 +47,8 @@ spinbuttons { .spinbuttons-up { -moz-appearance: none; -moz-box-flex: 1; - min-width: 12px; + min-width: 1px; + min-height: 1px; margin: 0; padding: 0; } @@ -55,7 +56,8 @@ spinbuttons { .spinbuttons-down { -moz-appearance: none; -moz-box-flex: 1; - min-width: 12px; + min-width: 1px; + min-height: 1px; margin: 0; padding: 0; } diff --git a/widget/src/cocoa/nsNativeThemeCocoa.mm b/widget/src/cocoa/nsNativeThemeCocoa.mm index 9686a455d57..6337198c303 100644 --- a/widget/src/cocoa/nsNativeThemeCocoa.mm +++ b/widget/src/cocoa/nsNativeThemeCocoa.mm @@ -1052,9 +1052,11 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsIRenderingContext* aContext, case NS_THEME_SPINNER: { - SInt32 buttonHeight = 0; - ::GetThemeMetric(kThemeMetricPushButtonHeight, &buttonHeight); - aResult->SizeTo(14, buttonHeight); + SInt32 buttonHeight = 0, buttonWidth = 0; + ::GetThemeMetric(kThemeMetricLittleArrowsWidth, &buttonWidth); + ::GetThemeMetric(kThemeMetricLittleArrowsHeight, &buttonHeight); + aResult->SizeTo(buttonWidth, buttonHeight); + *aIsOverridable = PR_FALSE; break; }