Add @media(-moz-windows-accent-color-applies)

#31 point 3
This commit is contained in:
wolfbeast 2017-07-19 13:11:28 +02:00 committed by Roy Tam
commit 6a03b3bc1a
6 changed files with 35 additions and 0 deletions

View file

@ -238,6 +238,15 @@ public:
// Should menu items blink when they're chosen?
eIntID_ChosenMenuItemsShouldBlink,
/*
* A Boolean value to determine whether the Windows accent color
* should be applied to the title bar.
*
* The value of this metric is not used on other platforms. These platforms
* should return NS_ERROR_NOT_IMPLEMENTED when queried for this metric.
*/
eIntID_WindowsAccentColorApplies,
/*
* A Boolean value to determine whether the Windows default theme is
* being used.

View file

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