Add -moz-windows-accent-color-is-dark

#31 point 4
This commit is contained in:
wolfbeast 2017-07-19 16:34:50 +02:00 • committed by Roy Tam
commit 8aa201ff06
6 changed files with 37 additions and 0 deletions

View file

@ -442,6 +442,14 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
aResult = NS_SUCCEEDED(GetAccentColor(unused)) ? 1 : 0;
}
break;
case eIntID_WindowsAccentColorIsDark:
{
nscolor accentColor;
if (NS_SUCCEEDED(GetAccentColor(accentColor))) {
aResult = AccentColorIsDark(accentColor) ? 1 : 0;
}
}
break;
case eIntID_WindowsGlass:
// Aero Glass is only available prior to Windows 8 when DWM is used.
aResult = (nsUXThemeData::CheckForCompositor() && !IsWin8OrLater());

View file

@ -7138,6 +7138,11 @@ nsWindow::OnSysColorChanged()
// so all presentations get notified properly.
// See nsWindow::GlobalMsgWindowProc.
NotifySysColorChanged();
// On Windows 10 only, we trigger a theme change to pick up changed media
// queries that are needed for accent color changes.
if (IsWin10OrLater()) {
NotifyThemeChanged();
}
}
}