From 5950b65028014c24a6917618b1cf4eed17c36214 Mon Sep 17 00:00:00 2001 From: henrypp Date: Sun, 24 Oct 2021 01:22:54 +0600 Subject: [PATCH] upd notification paint footer --- src/notifications.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/notifications.c b/src/notifications.c index 159a5753..a889c9e7 100644 --- a/src/notifications.c +++ b/src/notifications.c @@ -707,7 +707,10 @@ INT_PTR CALLBACK NotificationProc (_In_ HWND hwnd, _In_ UINT msg, _In_ WPARAM wp PAINTSTRUCT ps; RECT rect; HDC hdc; + LONG wnd_width; + LONG wnd_height; LONG footer_height; + COLORREF clr; hdc = BeginPaint (hwnd, &ps); @@ -716,15 +719,21 @@ INT_PTR CALLBACK NotificationProc (_In_ HWND hwnd, _In_ UINT msg, _In_ WPARAM wp if (GetClientRect (hwnd, &rect)) { footer_height = _r_dc_getdpi (PR_SIZE_FOOTERHEIGHT, _r_dc_getwindowdpi (hwnd)); + clr = GetSysColor (COLOR_WINDOW); - _r_dc_fillrect (hdc, &rect, GetSysColor (COLOR_WINDOW)); + wnd_width = rect.right; + wnd_height = rect.bottom; - SetRect (&rect, 0, rect.bottom - footer_height, rect.right, rect.bottom); + _r_dc_fillrect (hdc, &rect, clr); - _r_dc_fillrect (hdc, &rect, GetSysColor (COLOR_BTNFACE)); + SetRect (&rect, 0, wnd_height - footer_height, wnd_width, wnd_height); + + _r_dc_fillrect (hdc, &rect, _r_dc_getcolorshade (clr, 90)); + + clr = _r_dc_getcolorshade (clr, 70); for (INT i = 0; i < rect.right; i++) - SetPixelV (hdc, i, rect.top, GetSysColor (COLOR_APPWORKSPACE)); + SetPixelV (hdc, i, rect.top, clr); } EndPaint (hwnd, &ps);