mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
IDEA-210154 Borderless UI: Top frame of IDEA window is blue
(cherry picked from commit 2dd4163bc4)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
79adf6bad5
commit
af423f9c40
@@ -499,6 +499,16 @@ void CheckFontSmoothingSettings(HWND hWnd) {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL ColorizationColorAffectsBorders() {
|
||||
DWORD result = 0;
|
||||
DWORD bufSize(sizeof(DWORD));
|
||||
HKEY hKey = NULL;
|
||||
if (::RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\DWM"), 0, KEY_READ, &hKey) != ERROR_SUCCESS) return TRUE;
|
||||
if (::RegQueryValueEx(hKey, _T("ColorPrevalence"), NULL, NULL, reinterpret_cast<LPBYTE>(&result), &bufSize) != ERROR_SUCCESS) return TRUE;
|
||||
RegCloseKey(hKey);
|
||||
return result == 0 ? FALSE : TRUE;
|
||||
}
|
||||
|
||||
void AwtDesktopProperties::GetColorParameters() {
|
||||
|
||||
SetColorProperty(TEXT("win.frame.activeCaptionGradientColor"),
|
||||
@@ -525,6 +535,7 @@ void AwtDesktopProperties::GetColorParameters() {
|
||||
// [tav] todo: listen WM_DWMCOLORIZATIONCOLORCHANGED
|
||||
DwmGetColorizationColor(&color, &opaque);
|
||||
SetColorProperty(TEXT("win.dwm.colorizationColor"), RGB(GetBValue(color), GetGValue(color), GetRValue(color)));
|
||||
SetBooleanProperty(TEXT("win.dwm.colorizationColor.affects.borders"), ColorizationColorAffectsBorders());
|
||||
}
|
||||
|
||||
// ?? ?? ??
|
||||
|
||||
Reference in New Issue
Block a user