Bug 395565 spinner of cocoa has wrong size r=josh+enndeakin, sr+a=roc

This commit is contained in:
masayuki@d-toybox.com 2007-09-18 02:17:51 -07:00
parent 2e21d3ae6d
commit e7ca81ebed
2 changed files with 11 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;
}