mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
parent
41ee5136f4
commit
8aa201ff06
6 changed files with 37 additions and 0 deletions
|
|
@ -250,6 +250,15 @@ public:
|
|||
* should return NS_ERROR_NOT_IMPLEMENTED when queried for this metric.
|
||||
*/
|
||||
eIntID_WindowsAccentColorApplies,
|
||||
|
||||
/*
|
||||
* A Boolean value to determine whether the Windows accent color
|
||||
* is considered dark and should get bright text/controls.
|
||||
*
|
||||
* 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_WindowsAccentColorIsDark,
|
||||
|
||||
/*
|
||||
* A Boolean value to determine whether the Windows default theme is
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue