diff options
author | George Hazan <george.hazan@gmail.com> | 2023-05-28 20:07:07 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-05-28 20:07:07 +0300 |
commit | d806a42533a946c682bb58d5fd565f06889257aa (patch) | |
tree | cb330c2964ec832fcafe052bb64bd84bdf1f977e /src/mir_app | |
parent | af5fc20efd092d0f6993f4fb0f726ae3fe939825 (diff) |
more for #3528
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/headerbar.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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;
|