diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-04-16 18:17:56 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-04-16 18:17:56 +0200 |
| commit | 536ea04c34ba761d7031eeabb6d50adab0f0f2bd (patch) | |
| tree | 7def1b680705497636c2f5e5649c0ffeb477539c /alf/alfnotebook.cpp | |
| parent | 5cbb664bd49cd2b9c035ccfc3024aa436d28c36c (diff) | |
rework grid layout
Fractional expand is now supported like Qt, and also per row/column
instead of as a widget attribute.
Instead of margins, you're now supposed to use empty rows/columns instead.
Spacer is also gone, use empty rows/columns with minimum size.
Layout engine is prepared to directly calculate edit, button, etc.
sizes without subclassing these controls
Diffstat (limited to 'alf/alfnotebook.cpp')
| -rw-r--r-- | alf/alfnotebook.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/alf/alfnotebook.cpp b/alf/alfnotebook.cpp index 25e2904..8eaea6b 100644 --- a/alf/alfnotebook.cpp +++ b/alf/alfnotebook.cpp @@ -322,7 +322,7 @@ ALF_RegisterNotebookClass(void) // tab control HWND -ALF_AddNotebook(HWND parent, WORD id, UINT x, UINT y) +ALF_AddNotebook(HWND parent, WORD id, int x, int y) { HWND hwndNtbk = CreateWindowEx(WS_EX_CONTROLPARENT, _alf_notebookClass, @@ -334,16 +334,7 @@ ALF_AddNotebook(HWND parent, WORD id, UINT x, UINT y) ALF_HINSTANCE, NULL); - ALFWidgetLayoutParams p; - ZeroMemory(&p, sizeof(p)); - p.hwnd = hwndNtbk; - p.x = x; - p.y = y; - p.width = 0; - p.height = 0; - p.flags = ALF_QUERYSIZE | ALF_INHERITFONT; - - ALF_AddWidgetEx(parent, &p); + ALF_AddWidget(parent, x, y, hwndNtbk, 0, 0, ALF_LAYOUT_SIZE_QUERY | ALF_LAYOUT_INHERITFONT); return hwndNtbk; } |
