diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-05 23:24:33 +0100 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-05 23:24:33 +0100 |
| commit | 73ac4e4160eed3a564a9cc4128b16c49e94c06a7 (patch) | |
| tree | 392ce227492717dbb43f40e9c997710a489a45c3 /alf/alflayout.cpp | |
| parent | db2f529599cea4c86481ed6ca650a5b069c003b0 (diff) | |
changed my mind about how fonts should be applied to new widgets
Diffstat (limited to 'alf/alflayout.cpp')
| -rw-r--r-- | alf/alflayout.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp index 8d03a6b..7251ca6 100644 --- a/alf/alflayout.cpp +++ b/alf/alflayout.cpp @@ -18,7 +18,7 @@ ALF_Layout_Clear(ALFLayout *layout) static void -ALF_UpdateFontForWidget(ALFWidgetPriv *widget, const ALFWindowFonts *fonts) +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); @@ -30,12 +30,12 @@ ALF_UpdateFontForWidget(ALFWidgetPriv *widget, const ALFWindowFonts *fonts) } void -ALF_Layout_UpdateFonts(ALFLayout *layout, HWND window, const ALFWindowFonts *fonts) +ALF_Layout_ApplyFonts(ALFLayout *layout, HWND window, const ALFWindowFonts *fonts) { (void)window; ALF_FOR_LIST(ALFWidgetPriv, list, &layout->widgets, i) { - ALF_UpdateFontForWidget(i, fonts); + ALF_ApplyFontForWidget(i, fonts); } } @@ -255,13 +255,6 @@ ALF_Layout_AddWidget(ALFLayout* layout, HWND window, const ALFWidgetLayoutParams SetParent(w->hwnd, window); ALF_ListInsert(layout->widgets.prev, &w->list); - - if (w->flags & ALF_MESSAGEFONT) { - ALFWindowFonts fonts; - ZeroMemory(&fonts, sizeof(fonts)); - ALF_WindowFonts(window, &fonts); - ALF_UpdateFontForWidget(w, &fonts); - } } BOOL |
