Bug 1791024: Make focus ring use Canvastext and Selecteditem when HCM is enabled r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D189849
This commit is contained in:
Morgan Rae Reschenberg 2023-10-03 20:22:17 +00:00
parent 9018aa304e
commit 085934ef0f

View File

@ -1427,7 +1427,10 @@ void Theme::PaintAutoStyleOutline(nsIFrame* aFrame,
}
};
DrawRect(accentColor.Get());
auto primaryColor = aColors.HighContrast()
? aColors.System(StyleSystemColor::Selecteditem)
: accentColor.Get();
DrawRect(primaryColor);
if (solid) {
return;
@ -1439,7 +1442,10 @@ void Theme::PaintAutoStyleOutline(nsIFrame* aFrame,
LayoutDeviceCoord(ThemeDrawing::SnapBorderWidth(1.0f, aDpiRatio));
rect.Inflate(strokeWidth);
DrawRect(accentColor.GetForeground());
auto secondaryColor = aColors.HighContrast()
? aColors.System(StyleSystemColor::Canvastext)
: accentColor.GetForeground();
DrawRect(secondaryColor);
}
LayoutDeviceIntMargin Theme::GetWidgetBorder(nsDeviceContext* aContext,