summaryrefslogtreecommitdiff
path: root/alf/alf.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-21 16:27:40 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-21 16:27:40 +0200
commit2765ee8bfc1fb0152ed2da324bdcb0a37f43c722 (patch)
tree4ee5babb2e126e917fc4287d69610dd391bcd591 /alf/alf.cpp
parente40c5381c1338ab0bf7e6d409180d95c8d8e458d (diff)
make ALF_SetBackgroundColor disable color inheritance
Diffstat (limited to 'alf/alf.cpp')
-rw-r--r--alf/alf.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp
index 3bf9ae7..a23bdf0 100644
--- a/alf/alf.cpp
+++ b/alf/alf.cpp
@@ -449,11 +449,16 @@ ALF_InvalidateBackground(HWND win)
void
ALF_SetBackgroundColor(HWND win, ALFColor color)
{
+ HWND parent = GetParent(win);
+ if (parent) {
+ ALF_RemoveWidgetLayoutFlag(parent, win, ALF_LAYOUT_INHERITBGCOLOR);
+ }
+
SendMessage(win, ALF_WM_SETBGCOLOR, 0, (LPARAM)color);
}
ALFColor
-ALF_GetBackgroundColor(HWND win)
+ALF_BackgroundColor(HWND win)
{
return (ALFColor)SendMessage(win, ALF_WM_GETBGCOLOR, 0, 0);
}