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/alfbutton.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'alf/alfbutton.cpp') diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp index 582a90c..be9a276 100644 --- a/alf/alfbutton.cpp +++ b/alf/alfbutton.cpp @@ -475,6 +475,10 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT ALF_Compat_RemoveWindowSubclass(hwnd, ALF__ButtonSubclassProc, 0); } else if (uMsg == WM_ERASEBKGND) { return TRUE; + } else if (uMsg == WM_SETTEXT) { + ALF_InvalidateLayout(GetParent(hwnd)); + } else if (uMsg == WM_SETFONT) { + ALF_InvalidateLayout(GetParent(hwnd)); } return ALF_Compat_DefSubclassProc(hwnd, uMsg, wParam, lParam); -- cgit v1.2.3