|
|
|
|
@ -789,6 +789,24 @@ LRESULT CALLBACK epw_Weather_WindowProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPA
@@ -789,6 +789,24 @@ LRESULT CALLBACK epw_Weather_WindowProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPA
|
|
|
|
|
{ |
|
|
|
|
if (IsColorSchemeChangeMessage(lParam)) |
|
|
|
|
{ |
|
|
|
|
MARGINS marGlassInset; |
|
|
|
|
if (!IsHighContrast()) |
|
|
|
|
{ |
|
|
|
|
marGlassInset.cxLeftWidth = -1; // -1 means the whole window
|
|
|
|
|
marGlassInset.cxRightWidth = -1; |
|
|
|
|
marGlassInset.cyBottomHeight = -1; |
|
|
|
|
marGlassInset.cyTopHeight = -1; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
marGlassInset.cxLeftWidth = 0; |
|
|
|
|
marGlassInset.cxRightWidth = 0; |
|
|
|
|
marGlassInset.cyBottomHeight = 0; |
|
|
|
|
marGlassInset.cyTopHeight = 0; |
|
|
|
|
} |
|
|
|
|
DwmExtendFrameIntoClientArea(_this->hWnd, &marGlassInset); |
|
|
|
|
BOOL value = (IsThemeActive() && !IsHighContrast()) ? 1 : 0; |
|
|
|
|
DwmSetWindowAttribute(hWnd, 1029, &value, sizeof(BOOL)); |
|
|
|
|
LONG64 dwDarkMode = InterlockedAdd64(&_this->g_darkModeEnabled, 0); |
|
|
|
|
if (!dwDarkMode) |
|
|
|
|
{ |
|
|
|
|
@ -990,10 +1008,13 @@ DWORD WINAPI epw_Weather_MainThread(EPWeather* _this)
@@ -990,10 +1008,13 @@ DWORD WINAPI epw_Weather_MainThread(EPWeather* _this)
|
|
|
|
|
goto cleanup; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MARGINS marGlassInset = { -1, -1, -1, -1 }; // -1 means the whole window
|
|
|
|
|
DwmExtendFrameIntoClientArea(_this->hWnd, &marGlassInset); |
|
|
|
|
BOOL value = 1; |
|
|
|
|
DwmSetWindowAttribute(_this->hWnd, 1029, &value, sizeof(BOOL)); |
|
|
|
|
if (!IsHighContrast()) |
|
|
|
|
{ |
|
|
|
|
MARGINS marGlassInset = { -1, -1, -1, -1 }; // -1 means the whole window
|
|
|
|
|
DwmExtendFrameIntoClientArea(_this->hWnd, &marGlassInset); |
|
|
|
|
BOOL value = 1; |
|
|
|
|
DwmSetWindowAttribute(_this->hWnd, 1029, &value, sizeof(BOOL)); |
|
|
|
|
} |
|
|
|
|
LONG64 dwDarkMode = InterlockedAdd64(&_this->g_darkModeEnabled, 0); |
|
|
|
|
epw_Weather_SetDarkMode(_this, dwDarkMode, FALSE); |
|
|
|
|
|
|
|
|
|
|