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()
|
QColor WinNativeEventFilter::colorizationColor()
|
||||||
{
|
{
|
||||||
#if 1
|
|
||||||
DWORD color = 0;
|
DWORD color = 0;
|
||||||
BOOL opaqueBlend = FALSE;
|
BOOL opaqueBlend = FALSE;
|
||||||
return SUCCEEDED(
|
return SUCCEEDED(
|
||||||
WNEF_EXECUTE_WINAPI_RETURN(DwmGetColorizationColor, E_FAIL, &color, &opaqueBlend))
|
WNEF_EXECUTE_WINAPI_RETURN(DwmGetColorizationColor, E_FAIL, &color, &opaqueBlend))
|
||||||
? QColor::fromRgba(color)
|
? QColor::fromRgba(color)
|
||||||
: Qt::white;
|
: 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()
|
bool WinNativeEventFilter::lightThemeEnabled()
|
||||||
|
|
Loading…
Reference in New Issue