Bug 1399723 - Draw a grey background color when event state is active instead of hover. r?mats
MozReview-Commit-ID: CSX6xn1qy19
--- a/widget/android/AndroidColors.h
+++ b/widget/android/AndroidColors.h
@@ -10,14 +10,14 @@
namespace mozilla {
namespace widget {
static const Color sAndroidBackgroundColor(Color(1.0f, 1.0f, 1.0f));
static const Color sAndroidBorderColor(Color(0.73f, 0.73f, 0.73f));
static const Color sAndroidCheckColor(Color(0.19f, 0.21f, 0.23f));
static const Color sAndroidDisabledColor(Color(0.88f, 0.88f, 0.88f));
-static const Color sAndroidHoverColor(Color(0.94f, 0.94f, 0.94f));
+static const Color sAndroidActiveColor(Color(0.94f, 0.94f, 0.94f));
} // namespace widget
} // namespace mozilla
#endif // mozilla_widget_AndroidColors_h
--- a/widget/android/nsNativeThemeAndroid.cpp
+++ b/widget/android/nsNativeThemeAndroid.cpp
@@ -42,19 +42,19 @@ PaintCheckboxControl(nsIFrame* aFrame,
ColorPattern(ToDeviceColor(mozilla::widget::sAndroidBackgroundColor)));
if (aState.HasState(NS_EVENT_STATE_DISABLED)) {
aDrawTarget->Fill(roundedRect,
ColorPattern(ToDeviceColor(mozilla::widget::sAndroidDisabledColor)));
return;
}
- if (aState.HasState(NS_EVENT_STATE_HOVER)) {
+ if (aState.HasState(NS_EVENT_STATE_ACTIVE)) {
aDrawTarget->Fill(roundedRect,
- ColorPattern(ToDeviceColor(mozilla::widget::sAndroidHoverColor)));
+ ColorPattern(ToDeviceColor(mozilla::widget::sAndroidActiveColor)));
}
}
static void
PaintCheckMark(nsIFrame* aFrame,
DrawTarget* aDrawTarget,
const nsRect& aRect)
{
@@ -131,19 +131,19 @@ PaintRadioControl(nsIFrame* aFrame,
ColorPattern(ToDeviceColor(mozilla::widget::sAndroidBackgroundColor)));
if (aState.HasState(NS_EVENT_STATE_DISABLED)) {
aDrawTarget->Fill(ellipse,
ColorPattern(ToDeviceColor(mozilla::widget::sAndroidDisabledColor)));
return;
}
- if (aState.HasState(NS_EVENT_STATE_HOVER)) {
+ if (aState.HasState(NS_EVENT_STATE_ACTIVE)) {
aDrawTarget->Fill(ellipse,
- ColorPattern(ToDeviceColor(mozilla::widget::sAndroidHoverColor)));
+ ColorPattern(ToDeviceColor(mozilla::widget::sAndroidActiveColor)));
}
}
static void
PaintCheckedRadioButton(nsIFrame* aFrame,
DrawTarget* aDrawTarget,
const nsRect& aRect)
{