From ac663083950b2e00573395d68348302df94e3ac1 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 19 Jul 2017 13:11:28 +0200 Subject: Add `@media(-moz-windows-accent-color-applies)` #31 point 3 --- widget/LookAndFeel.h | 9 +++++++++ widget/windows/nsLookAndFeel.cpp | 6 ++++++ 2 files changed, 15 insertions(+) (limited to 'widget') diff --git a/widget/LookAndFeel.h b/widget/LookAndFeel.h index 3a4929c9f..b7a05748e 100644 --- a/widget/LookAndFeel.h +++ b/widget/LookAndFeel.h @@ -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. diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp index 7c427ac9f..60e351323 100644 --- a/widget/windows/nsLookAndFeel.cpp +++ b/widget/windows/nsLookAndFeel.cpp @@ -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()); -- cgit v1.2.3