mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
Bug 1682210 - Render non-native theme indeterminate, unchecked checkboxes liked indeterminate, checked ones. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D99644
This commit is contained in:
parent
d8c9489b13
commit
8d722de758
@ -107,18 +107,19 @@ std::pair<sRGBColor, sRGBColor> nsNativeBasicTheme::ComputeCheckboxColors(
|
||||
NS_EVENT_STATE_ACTIVE);
|
||||
bool isHovered = !isDisabled && aState.HasState(NS_EVENT_STATE_HOVER);
|
||||
bool isChecked = aState.HasState(NS_EVENT_STATE_CHECKED);
|
||||
bool isIndeterminate = aState.HasState(NS_EVENT_STATE_INDETERMINATE);
|
||||
|
||||
sRGBColor backgroundColor = sColorWhite;
|
||||
sRGBColor borderColor = sColorGrey40;
|
||||
if (isDisabled) {
|
||||
if (isChecked) {
|
||||
if (isChecked || isIndeterminate) {
|
||||
backgroundColor = borderColor = sColorGrey40Alpha50;
|
||||
} else {
|
||||
backgroundColor = sColorWhiteAlpha50;
|
||||
borderColor = sColorGrey40Alpha50;
|
||||
}
|
||||
} else {
|
||||
if (isChecked) {
|
||||
if (isChecked || isIndeterminate) {
|
||||
if (isPressed) {
|
||||
backgroundColor = borderColor = sColorAccentDarker;
|
||||
} else if (isHovered) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user