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 09:17:51 +00:00
Родитель 9b1f783188
Коммит 556bc53589
2 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -14,12 +14,12 @@
* The Original Code is mozilla.org code. * The Original Code is mozilla.org code.
* *
* The Initial Developer of the Original Code is * 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 * Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * 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 * 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 * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -47,7 +47,8 @@ spinbuttons {
.spinbuttons-up { .spinbuttons-up {
-moz-appearance: none; -moz-appearance: none;
-moz-box-flex: 1; -moz-box-flex: 1;
min-width: 12px; min-width: 1px;
min-height: 1px;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
@ -55,7 +56,8 @@ spinbuttons {
.spinbuttons-down { .spinbuttons-down {
-moz-appearance: none; -moz-appearance: none;
-moz-box-flex: 1; -moz-box-flex: 1;
min-width: 12px; min-width: 1px;
min-height: 1px;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }

Просмотреть файл

@ -1052,9 +1052,11 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsIRenderingContext* aContext,
case NS_THEME_SPINNER: case NS_THEME_SPINNER:
{ {
SInt32 buttonHeight = 0; SInt32 buttonHeight = 0, buttonWidth = 0;
::GetThemeMetric(kThemeMetricPushButtonHeight, &buttonHeight); ::GetThemeMetric(kThemeMetricLittleArrowsWidth, &buttonWidth);
aResult->SizeTo(14, buttonHeight); ::GetThemeMetric(kThemeMetricLittleArrowsHeight, &buttonHeight);
aResult->SizeTo(buttonWidth, buttonHeight);
*aIsOverridable = PR_FALSE;
break; break;
} }