Prefer do_GetAtom to dont_AddRef(NS_NewAtom(...)). Also, tweak the borders on checkbox/radio buttons and containers a bit. Not part of the build.

This commit is contained in:
bryner%netscape.com 2002-02-16 10:43:59 +00:00
parent 372f4318e8
commit d52d18f23e

View File

@ -70,12 +70,12 @@ nsNativeThemeGTK::nsNativeThemeGTK()
mProtoLayout(nsnull)
{
NS_INIT_ISUPPORTS();
mDisabledAtom = getter_AddRefs(NS_NewAtom("disabled"));
mCheckedAtom = getter_AddRefs(NS_NewAtom("checked"));
mSelectedAtom = getter_AddRefs(NS_NewAtom("selected"));
mInputCheckedAtom = getter_AddRefs(NS_NewAtom("_moz-input-checked"));
mInputAtom = getter_AddRefs(NS_NewAtom("input"));
mFocusedAtom = getter_AddRefs(NS_NewAtom("focused"));
mDisabledAtom = do_GetAtom("disabled");
mCheckedAtom = do_GetAtom("checked");
mSelectedAtom = do_GetAtom("selected");
mInputCheckedAtom = do_GetAtom("_moz-input-checked");
mInputAtom = do_GetAtom("input");
mFocusedAtom = do_GetAtom("focused");
}
nsNativeThemeGTK::~nsNativeThemeGTK() {
@ -358,11 +358,6 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
EnsureButtonWidget();
WidgetBorderToMargin(gButtonWidget, aResult);
break;
case NS_THEME_CHECKBOX:
case NS_THEME_RADIO:
EnsureCheckBoxWidget();
WidgetBorderToMargin(gCheckboxWidget, aResult);
break;
case NS_THEME_TOOLBAR_GRIPPER:
EnsureGripperWidget();
WidgetBorderToMargin(gGripperWidget, aResult);
@ -371,6 +366,10 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
EnsureArrowWidget();
WidgetBorderToMargin(gDropdownButtonWidget, aResult);
break;
case NS_THEME_CHECKBOX_CONTAINER:
case NS_THEME_RADIO_CONTAINER:
aResult->top = aResult->bottom = aResult->left = aResult->right = 1;
break;
}
return NS_OK;