From 2765ee8bfc1fb0152ed2da324bdcb0a37f43c722 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Tue, 21 Apr 2020 16:27:40 +0200 Subject: make ALF_SetBackgroundColor disable color inheritance --- alf/alflayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alf/alflayout.cpp') diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp index 228e5b3..2dfe16d 100644 --- a/alf/alflayout.cpp +++ b/alf/alflayout.cpp @@ -444,7 +444,7 @@ ALF_Layout_AddWidget(ALFLayout* layout, HWND window, const ALFAddWidgetParams* p ALF_Layout_ForwardFontToWidget(layout, window, w, (HFONT)SendMessage(window, WM_GETFONT, 0, 0), 0); } if (w->flags & ALF_LAYOUT_INHERITBGCOLOR) { - ALF_SetBackgroundColor(w->hwnd, ALF_GetBackgroundColor(window)); + SendMessage(w->hwnd, ALF_WM_SETBGCOLOR, 0, (LPARAM)ALF_BackgroundColor(window)); } ALF_ListInsert(layout->widgets.prev, &w->list); @@ -600,7 +600,7 @@ ALF_Layout_SetWidgetFlags(ALFLayout *layout, HWND window, HWND needle, DWORD fla if (flags & ALF_LAYOUT_INHERITFONT) ALF_Layout_ForwardFontToWidget(layout, window, w, (HFONT)SendMessage(window, WM_GETFONT, 0, 0), 0); if (flags & ALF_LAYOUT_INHERITBGCOLOR) - ALF_SetBackgroundColor(w->hwnd, ALF_GetBackgroundColor(window)); + SendMessage(w->hwnd, ALF_WM_SETBGCOLOR, 0, (LPARAM)ALF_BackgroundColor(window)); ALF_Layout_Invalidate(layout, window); -- cgit v1.2.3