diff options
Diffstat (limited to 'alf/alflayout.cpp')
| -rw-r--r-- | alf/alflayout.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp index 5e207d8..caf9857 100644 --- a/alf/alflayout.cpp +++ b/alf/alflayout.cpp @@ -20,12 +20,17 @@ ALF_Layout_Clear(ALFLayout *layout) static void ALF_ApplyFontForWidget(ALFWidgetPriv *widget, const ALFWindowFonts *fonts) { - if (widget->hwnd && (widget->flags & ALF_MESSAGEFONT) == ALF_MESSAGEFONT) { - SendMessage(widget->hwnd, WM_SETFONT, (WPARAM)fonts->hMessageFont, (LPARAM)NULL); + if (widget->hwnd) { + if (widget->flags & ALF_MESSAGEFONT) { + SendMessage(widget->hwnd, WM_SETFONT, (WPARAM)fonts->hMessageFont, (LPARAM)NULL); - // XXX: Invalidating should IMHO be the decision of the control, but at - // least the commctl32 V5 static control doesn't do it. - InvalidateRect(widget->hwnd, NULL, TRUE); + // XXX: Invalidating should IMHO be the decision of the control, but at + // least the commctl32 V5 static control doesn't do it. + InvalidateRect(widget->hwnd, NULL, TRUE); + } + if ((widget->flags & ALF_ALLFONTS) == ALF_ALLFONTS) { + SendMessage(widget->hwnd, ALF_WM_APPLYFONTS, 0, (LPARAM)fonts); + } } } @@ -329,6 +334,11 @@ ALF_Layout_HandleMessage(ALFLayout *layout, HWND hwnd, UINT msg, WPARAM wparam, return TRUE; } + if (msg == ALF_WM_APPLYFONTS && lparam != 0) { + ALF_Layout_ApplyFonts(layout, hwnd, (const ALFWindowFonts *)lparam); + return TRUE; + } + if (msg == ALF_WM_APPLYLAYOUT) { ALF_Layout_Apply(layout, hwnd); return TRUE; |
