diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-06-06 11:54:18 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-06-06 11:54:18 +0200 |
| commit | 12ba6ccef311641c991c4bf1334627b27d8e263e (patch) | |
| tree | a246b34d1e97537ab5d9a6e09f8f23cad7d38076 /alf/alflayout.cpp | |
| parent | d607540dbaf8a0b2a24dceb27ebddddb420ffd0f (diff) | |
forward WM_SETTINGCHANGE and WM_SYSCOLORCHANGE to controls
Diffstat (limited to 'alf/alflayout.cpp')
| -rw-r--r-- | alf/alflayout.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp index 745b303..ba2854b 100644 --- a/alf/alflayout.cpp +++ b/alf/alflayout.cpp @@ -1056,6 +1056,28 @@ ALF_Layout_HandleMessage(ALFLayout *layout, HWND hwnd, UINT msg, WPARAM wparam, return TRUE; } + if (msg == WM_SYSCOLORCHANGE) { + // forward to children + ALF_FOR_LIST(ALFControlPriv, list, &layout->controls, c) { + SendMessage(c->hwnd, WM_SYSCOLORCHANGE, wparam, lparam); + } + + return FALSE; + } + + if (msg == WM_SETTINGCHANGE) { + // Controls could technically figure out if their layout parameters + // have changed, but that is not easy so nobody would bother anyway. + ALF_Layout_Invalidate(layout, hwnd); + + // forward to children + ALF_FOR_LIST(ALFControlPriv, list, &layout->controls, c) { + SendMessage(c->hwnd, WM_SETTINGCHANGE, wparam, lparam); + } + + return FALSE; + } + if (msg == ALF_WM_SETBGCOLOR) { *pRet = 1; if (layout->bgcolor == (ALFColor)lparam) |
