diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-06 22:40:10 +0100 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-06 22:40:10 +0100 |
| commit | e3daffea5b8596a5dfcf9a79920d9c17344f511b (patch) | |
| tree | 8edfe5d037d690c8167b417f48be6dca79aa615d /alf/alflayout.cpp | |
| parent | 8543cc8ce9e25b807a950accbd34995572a8a2cc (diff) | |
initial panel implementation
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; |
