зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1675389 - Tweak the baseline of checkbox/radio buttons on the non-native theme. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D102478
This commit is contained in:
Родитель
b06a920288
Коммит
ac01ad2d5e
|
@ -1332,6 +1332,11 @@ LayoutDeviceIntMargin nsNativeBasicTheme::GetWidgetBorder(
|
|||
LayoutDeviceIntCoord w = (kButtonBorderWidth * dpiRatio).Rounded();
|
||||
return LayoutDeviceIntMargin(w, w, w, w);
|
||||
}
|
||||
case StyleAppearance::Checkbox:
|
||||
case StyleAppearance::Radio: {
|
||||
LayoutDeviceIntCoord w = (kCheckboxRadioBorderWidth * dpiRatio).Rounded();
|
||||
return LayoutDeviceIntMargin(w, w, w, w);
|
||||
}
|
||||
default:
|
||||
return LayoutDeviceIntMargin();
|
||||
}
|
||||
|
|
|
@ -117,6 +117,10 @@ static const CSSCoord kRangeHeight = 6.0f;
|
|||
static const CSSCoord kProgressbarHeight = 6.0f;
|
||||
static const CSSCoord kMeterHeight = 12.0f;
|
||||
|
||||
// nsCheckboxRadioFrame takes the bottom of the content box as the baseline.
|
||||
// This border-width makes its baseline 2px under the bottom, which is nice.
|
||||
static const CSSCoord kCheckboxRadioBorderWidth = 2.0f;
|
||||
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче