From 0948993ec9e08e170d1d22f2c7176b00bd987103 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Tue, 14 Apr 2020 16:02:05 +0200 Subject: Make notebook bg gradient work. Anti-flicker work throughout the codebase. --- alf/alfbutton.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'alf/alfbutton.cpp') diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp index fb8d1c3..ce87f15 100644 --- a/alf/alfbutton.cpp +++ b/alf/alfbutton.cpp @@ -178,6 +178,8 @@ ALF__Button_Render3x(HWND hwnd, ALFButtonPriv *priv, LPDRAWITEMSTRUCT dis) { RECT r = dis->rcItem; + ALF_Compat_DrawThemeParentBackground(hwnd, dis->hDC, &r); + int textlen = GetWindowTextLength(hwnd); TCHAR *textbuf = ALF_New(TCHAR, textlen + 1); GetWindowText(hwnd, textbuf, textlen+1); @@ -473,6 +475,8 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT ALF_Compat_CloseThemeData(priv->hTheme); ALF_Free(priv); ALF_Compat_RemoveWindowSubclass(hwnd, ALF__ButtonSubclassProc, 0); + } else if (uMsg == WM_ERASEBKGND) { + return TRUE; } return ALF_Compat_DefSubclassProc(hwnd, uMsg, wParam, lParam); -- cgit v1.2.3