mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 1690954 - Draw the menulist arrow button using currentColor rather than a fixed color. r=jfkthame
As its background might not be themed. Differential Revision: https://phabricator.services.mozilla.com/D115194
This commit is contained in:
parent
2077c29048
commit
f2a6ce01df
@ -619,16 +619,6 @@ std::pair<sRGBColor, sRGBColor> nsNativeBasicTheme::ComputeMeterchunkColors(
|
||||
return std::make_pair(chunkColor, borderColor);
|
||||
}
|
||||
|
||||
sRGBColor nsNativeBasicTheme::ComputeMenulistArrowButtonColor(
|
||||
const EventStates& aState, UseSystemColors aUseSystemColors) {
|
||||
bool isDisabled = aState.HasState(NS_EVENT_STATE_DISABLED);
|
||||
if (bool(aUseSystemColors)) {
|
||||
return SystemColor(isDisabled ? StyleSystemColor::Graytext
|
||||
: StyleSystemColor::TextForeground);
|
||||
}
|
||||
return isDisabled ? sColorGrey60Alpha50 : sColorGrey60;
|
||||
}
|
||||
|
||||
std::array<sRGBColor, 3> nsNativeBasicTheme::ComputeFocusRectColors(
|
||||
const AccentColor& aAccent, UseSystemColors aUseSystemColors) {
|
||||
if (bool(aUseSystemColors)) {
|
||||
@ -1356,8 +1346,8 @@ void nsNativeBasicTheme::PaintMenulistArrowButton(
|
||||
|
||||
const float kPolygonSize = kMinimumDropdownArrowButtonWidth;
|
||||
|
||||
sRGBColor arrowColor =
|
||||
ComputeMenulistArrowButtonColor(aState, aUseSystemColors);
|
||||
const auto arrowColor = sRGBColor::FromABGR(
|
||||
nsLayoutUtils::GetColor(aFrame, &nsStyleText::mWebkitTextFillColor));
|
||||
PaintArrow(aDrawTarget, aRect, kPolygonX, kPolygonY, kPolygonSize,
|
||||
ArrayLength(kPolygonX), arrowColor);
|
||||
}
|
||||
|
@ -212,8 +212,6 @@ class nsNativeBasicTheme : protected nsNativeTheme, public nsITheme {
|
||||
std::pair<sRGBColor, sRGBColor> ComputeProgressTrackColors(UseSystemColors);
|
||||
std::pair<sRGBColor, sRGBColor> ComputeMeterchunkColors(
|
||||
const EventStates& aMeterState, UseSystemColors);
|
||||
sRGBColor ComputeMenulistArrowButtonColor(const EventStates&,
|
||||
UseSystemColors);
|
||||
std::array<sRGBColor, 3> ComputeFocusRectColors(const AccentColor&,
|
||||
UseSystemColors);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user