Bug 1941755 - Tweak checked radio rendering as per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234341
This commit is contained in:
@@ -652,14 +652,13 @@ void Theme::PaintRadioControl(PaintBackendData& aPaintData,
|
||||
}
|
||||
|
||||
if (aState.HasState(ElementState::CHECKED)) {
|
||||
const CSSCoord kInnerBorderWidth = 2.0f;
|
||||
LayoutDeviceRect rect(aRect);
|
||||
auto width = LayoutDeviceCoord(
|
||||
ThemeDrawing::SnapBorderWidth(kInnerBorderWidth, aDpiRatio));
|
||||
rect.Deflate(width);
|
||||
|
||||
PaintStrokedCircle(aPaintData, rect, backgroundColor, checkColor,
|
||||
kInnerBorderWidth, aDpiRatio);
|
||||
// Make the inner white dot take ~half of the checkbox (snapped to device
|
||||
// pixels).
|
||||
rect.Deflate(std::max(LayoutDeviceIntCoord(1),
|
||||
(LayoutDeviceCoord(rect.width) * 0.25f).Truncated()));
|
||||
PaintStrokedCircle(aPaintData, rect, checkColor, sTransparent, 0,
|
||||
aDpiRatio);
|
||||
}
|
||||
|
||||
if (aState.HasState(ElementState::FOCUSRING)) {
|
||||
|
||||
Reference in New Issue
Block a user