forked from github_mirror/framelesshelper
Minor tweaks.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
f5a6493364
commit
9964d97374
|
@ -2539,19 +2539,12 @@ bool WinNativeEventFilter::colorizationEnabled()
|
|||
|
||||
QColor WinNativeEventFilter::colorizationColor()
|
||||
{
|
||||
#if 1
|
||||
DWORD color = 0;
|
||||
BOOL opaqueBlend = FALSE;
|
||||
return SUCCEEDED(
|
||||
WNEF_EXECUTE_WINAPI_RETURN(DwmGetColorizationColor, E_FAIL, &color, &opaqueBlend))
|
||||
? QColor::fromRgba(color)
|
||||
: Qt::white;
|
||||
#else
|
||||
bool ok = false;
|
||||
const QSettings registry(g_sDwmRegistryKey, QSettings::NativeFormat);
|
||||
const quint64 color = registry.value(QLatin1String("ColorizationColor"), 0).toULongLong(&ok);
|
||||
return ok ? QColor::fromRgba(color) : Qt::white;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool WinNativeEventFilter::lightThemeEnabled()
|
||||
|
|
Loading…
Reference in New Issue