diff --git a/include/FramelessHelper/Core/framelesshelper_windows.h b/include/FramelessHelper/Core/framelesshelper_windows.h index 2d41d31d..97d9070a 100644 --- a/include/FramelessHelper/Core/framelesshelper_windows.h +++ b/include/FramelessHelper/Core/framelesshelper_windows.h @@ -779,7 +779,8 @@ using ACCENT_STATE = enum ACCENT_STATE using ACCENT_FLAG = enum ACCENT_FLAG { ACCENT_NONE = 0, - ACCENT_ENABLE_LUMINOSITY = 1 << 1, + ACCENT_ENABLE_ACRYLIC = 1, + ACCENT_ENABLE_MICA = 1 << 1, ACCENT_ENABLE_BORDER_LEFT = 1 << 5, ACCENT_ENABLE_BORDER_TOP = 1 << 6, ACCENT_ENABLE_BORDER_RIGHT = 1 << 7, @@ -790,8 +791,8 @@ using ACCENT_FLAG = enum ACCENT_FLAG using ACCENT_POLICY = struct ACCENT_POLICY { - ACCENT_STATE AccentState; - ACCENT_FLAG AccentFlags; + DWORD AccentState; + DWORD AccentFlags; DWORD dwGradientColor; // #AABBGGRR DWORD dwAnimationId; }; diff --git a/src/core/framelesshelper_win.cpp b/src/core/framelesshelper_win.cpp index 78ee8d61..8f805855 100644 --- a/src/core/framelesshelper_win.cpp +++ b/src/core/framelesshelper_win.cpp @@ -252,9 +252,11 @@ void FramelessHelperWin::addWindow(FramelessParamsConst params) // Windows, which means only the top level windows can be scaled to the correct // size, we of course don't want such thing from happening. std::ignore = Utils::fixupChildWindowsDpiMessage(windowId); +#if 0 // Conflicts with our blur mode setting. if (Utils::isWindowAccelerated(window) && Utils::isWindowTransparent(window)) { std::ignore = Utils::updateFramebufferTransparency(windowId); } +#endif if (WindowsVersionHelper::isWin10RS1OrGreater()) { // Tell DWM we may need dark theme non-client area (title bar & frame border). FramelessHelperEnableThemeAware(); @@ -1267,11 +1269,13 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me } } +#if 0 // Conflicts with our blur mode setting. if ((uMsg == WM_DWMCOMPOSITIONCHANGED) || (uMsg == WM_DWMCOLORIZATIONCOLORCHANGED)) { if (Utils::isWindowAccelerated(window) && Utils::isWindowTransparent(window)) { std::ignore = Utils::updateFramebufferTransparency(windowId); } } +#endif const bool wallpaperChanged = ((uMsg == WM_SETTINGCHANGE) && (wParam == SPI_SETDESKWALLPAPER)); bool systemThemeChanged = ((uMsg == WM_THEMECHANGED) || (uMsg == WM_SYSCOLORCHANGE) diff --git a/src/core/utils.cpp b/src/core/utils.cpp index 00381e09..e3f4d085 100644 --- a/src/core/utils.cpp +++ b/src/core/utils.cpp @@ -575,7 +575,7 @@ quint32 Utils::defaultScreenDpi() QColor Utils::getAccentColor() { #if (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)) - return QGuiApplication::palette().color(QPalette::AccentColor); + return QGuiApplication::palette().color(QPalette::Accent); #else // (QT_VERSION < QT_VERSION_CHECK(6, 6, 0)) # ifdef Q_OS_WINDOWS return getAccentColor_windows(); diff --git a/src/core/utils_win.cpp b/src/core/utils_win.cpp index 10e078fb..ed33020e 100644 --- a/src/core/utils_win.cpp +++ b/src/core/utils_win.cpp @@ -2454,13 +2454,13 @@ bool Utils::setBlurBehindWindowEnabled(const WId windowId, const BlurMode mode, SecureZeroMemory(&policy, sizeof(policy)); if (blurMode == BlurMode::Windows_Acrylic) { policy.AccentState = ACCENT_ENABLE_ACRYLICBLURBEHIND; - policy.AccentFlags = ACCENT_ENABLE_LUMINOSITY; + policy.AccentFlags = ACCENT_ENABLE_ACRYLIC; // Mica: ACCENT_ENABLE_MICA | ACCENT_ENABLE_BORDER const auto gradientColor = [&color]() -> QColor { if (color.isValid()) { return color; } QColor clr = ((FramelessManager::instance()->systemTheme() == SystemTheme::Dark) ? kDefaultSystemDarkColor : kDefaultSystemLightColor); - clr.setAlphaF(0.9f); + clr.setAlphaF(0.5f); return clr; }(); // This API expects the #AABBGGRR format.