summaryrefslogtreecommitdiff
path: root/alf/alfnotebook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfnotebook.cpp')
-rw-r--r--alf/alfnotebook.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/alf/alfnotebook.cpp b/alf/alfnotebook.cpp
index 705d314..3b60ba5 100644
--- a/alf/alfnotebook.cpp
+++ b/alf/alfnotebook.cpp
@@ -103,6 +103,8 @@ ALF_Notebook_InternalAddTab(HWND notebook, HWND tabControl, const TCHAR *title)
HWND hwndPanel = ALF_CreatePanelWindow(notebook, (WORD)-1);
SetWindowPos(hwndPanel, NULL, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOOWNERZORDER);
+ SendMessage(hwndPanel, WM_SETFONT, (WPARAM)SendMessage(tabControl, WM_GETFONT, 0, 0), 0);
+
TCITEM tie;
ZeroMemory(&tie, sizeof(tie));
@@ -198,14 +200,6 @@ ALF__NotebookWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ALF_Notebook_FreePriv(priv);
SetWindowLongPtr(hwnd, 0, 0);
priv = NULL;
- } else if (uMsg == ALF_WM_APPLYFONTS) {
- int n = ALF_Notebook_InternalTabCount(hwnd, priv->hwndTabCtrl);
- for (int i = 0; i < n; ++i) {
- HWND p = ALF_Notebook_InternalTabPanel(hwnd, priv->hwndTabCtrl, i);
- SendMessage(p, ALF_WM_APPLYFONTS, wParam, lParam);
- }
-
- return TRUE;
} else if (uMsg == WM_SETFONT) {
SendMessage(priv->hwndTabCtrl, WM_SETFONT, wParam, lParam);
@@ -214,6 +208,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);
}
+ } else if (uMsg == WM_GETFONT) {
+ return SendMessage(priv->hwndTabCtrl, WM_GETFONT, wParam, lParam);
} else if (uMsg == ALF_WM_QUERYSIZE) {
int n = ALF_Notebook_InternalTabCount(hwnd, priv->hwndTabCtrl);
RECT r = { 0, 0, 0, 0 };
@@ -338,7 +334,7 @@ ALF_AddNotebook(HWND parent, WORD id, UINT x, UINT y)
p.y = y;
p.width = 0;
p.height = 0;
- p.flags = ALF_QUERYSIZE | ALF_MESSAGEFONT | ALF_SENDAPPLYFONTS;
+ p.flags = ALF_QUERYSIZE | ALF_INHERITFONT;
ALF_AddWidgetEx(parent, &p);