summaryrefslogtreecommitdiff
path: root/alf/alfnotebook.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-16 13:12:32 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-16 13:12:32 +0200
commit5cbb664bd49cd2b9c035ccfc3024aa436d28c36c (patch)
treee7f83c28b89b8597d38a6b5664ba2ff0afee852e /alf/alfnotebook.cpp
parentfc7b721e12b6a07cb2b6566c196b9a6c4265c2af (diff)
layout: invalidate and recalculate, automatically
Diffstat (limited to 'alf/alfnotebook.cpp')
-rw-r--r--alf/alfnotebook.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/alf/alfnotebook.cpp b/alf/alfnotebook.cpp
index 3b60ba5..25e2904 100644
--- a/alf/alfnotebook.cpp
+++ b/alf/alfnotebook.cpp
@@ -89,6 +89,7 @@ ALF_Notebook_InternalHandleThemeChange(HWND hwndNotebook, ALFNotebookPriv *priv)
priv->hTheme = ALF_Compat_OpenThemeData(hwndNotebook, L"TAB");
InvalidateRect(hwndNotebook, NULL, TRUE);
+ ALF_InvalidateLayout(hwndNotebook);
}
@@ -115,6 +116,8 @@ ALF_Notebook_InternalAddTab(HWND notebook, HWND tabControl, const TCHAR *title)
TabCtrl_InsertItem(tabControl, ALF_Notebook_InternalTabCount(notebook, tabControl), &tie);
ALF_Notebook_InternalHandleTabChange(notebook, tabControl);
+ ALF_InvalidateLayout(notebook);
+
return hwndPanel;
}
@@ -208,6 +211,8 @@ ALF__NotebookWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND p = ALF_Notebook_InternalTabPanel(hwnd, priv->hwndTabCtrl, i);
SendMessage(p, WM_SETFONT, wParam, lParam);
}
+
+ ALF_InvalidateLayout(hwnd);
} else if (uMsg == WM_GETFONT) {
return SendMessage(priv->hwndTabCtrl, WM_GETFONT, wParam, lParam);
} else if (uMsg == ALF_WM_QUERYSIZE) {
@@ -286,6 +291,8 @@ ALF__NotebookWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
EndPaint(hwnd, &ps);
return 0;
+ } else if (uMsg == ALF_WM_INVALIDATELAYOUT) {
+ ALF_InvalidateLayout(GetParent(hwnd));
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);