From d806a42533a946c682bb58d5fd565f06889257aa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 28 May 2023 20:07:07 +0300 Subject: more for #3528 --- src/mir_app/src/headerbar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/headerbar.cpp b/src/mir_app/src/headerbar.cpp index f312b22145..296d302797 100644 --- a/src/mir_app/src/headerbar.cpp +++ b/src/mir_app/src/headerbar.cpp @@ -122,7 +122,8 @@ static void MHeaderbar_DrawGradient(HDC hdc, int x, int y, int width, int height static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit) { - int iTopSpace = IsAeroMode() ? 0 : 3; + bool bUseAero = IsAeroMode() && !IsWinVer10Plus(); + int iTopSpace = bUseAero ? 0 : 3; PAINTSTRUCT ps; int titleLength = GetWindowTextLength(hwndDlg) + 1; @@ -147,7 +148,7 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit) HBITMAP hOldBmp = (HBITMAP)SelectObject(tempDC, hBmp); - if (IsAeroMode()) { + if (bUseAero) { RECT temprc = { 0, 0, mit->width, mit->width }; FillRect(tempDC, &temprc, (HBRUSH)GetStockObject(BLACK_BRUSH)); @@ -192,7 +193,7 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit) textRect.top = 2 + iTopSpace; textRect.bottom = g_iIconY - 2 + iTopSpace; - if (IsAeroMode()) { + if (bUseAero) { DTTOPTS dto = { 0 }; dto.dwSize = sizeof(dto); dto.dwFlags = DTT_COMPOSITED | DTT_GLOWSIZE; -- cgit v1.2.3