From 5cbb664bd49cd2b9c035ccfc3024aa436d28c36c Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Thu, 16 Apr 2020 13:12:32 +0200 Subject: layout: invalidate and recalculate, automatically --- alf/alf.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'alf/alf.h') diff --git a/alf/alf.h b/alf/alf.h index d98dfef..a429472 100644 --- a/alf/alf.h +++ b/alf/alf.h @@ -61,6 +61,8 @@ typedef struct { #define ALF_WM_SETLAYOUTPARAMS (ALF_WM__BASE + 14) #define ALF_WM_GETWIDGETATPOS (ALF_WM__BASE + 15) #define ALF_WM_PRETRANSLATEMSG (ALF_WM__BASE + 16) +#define ALF_WM_INVALIDATELAYOUT (ALF_WM__BASE + 17) +#define ALF_WM_VALIDATELAYOUT (ALF_WM__BASE + 18) #define ALF_WM_LBL_GETSTYLE (ALF_WM__BASE + 201) #define ALF_WM_LBL_SETSTYLE (ALF_WM__BASE + 202) @@ -155,15 +157,11 @@ HWND ALF_WidgetHwndById(HWND win, WORD id); void -ALF_RecalculateLayout(HWND win); +ALF_InvalidateLayout(HWND win); // Recalculates the window's DPI and all fonts and applies them to child widgets. // ALF does this automatically on a DPI or settings change so you shouldn't have -// to call ALF_UpdateFonts(). If you have added new widgets and want to set their -// fonts, call ALF_ApplyFonts() instead. -// -// Since widget sizes depend on the assigned font, you should probably -// call ALF_RecalculateLayout() afterwards. +// to call ALF_UpdateFonts(). void ALF_UpdateFonts(HWND win); -- cgit v1.2.3